On 10/3/23 1:46 PM, Ingo Molnar wrote:
>
> * Muhammad Usama Anjum wrote:
>
>> Kselftests are kernel tests and must be build with kernel headers from
>> same source version. These duplicate defines should automatically
>> picked up from kernel headers. Use KHDR_IN
On 10/6/23 1:25 AM, Ingo Molnar wrote:
>
> * Muhammad Usama Anjum wrote:
>
>> On 10/3/23 1:46 PM, Ingo Molnar wrote:
>>>
>>> * Muhammad Usama Anjum wrote:
>>>
>>>> Kselftests are kernel tests and must be build with kernel headers from
&g
On 9/4/23 3:48 PM, Muhammad Usama Anjum wrote:
> On 8/22/23 1:57 PM, Muhammad Usama Anjum wrote:
>> Hi Shuah,
>>
>> Christian Brauner had picked [PATCH 4/6]. Others are still not picked.
>> Please have a look.
Shuah, I thought you had picked up these patches. But I
.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Make the explanation correct
---
.../selftests/futex/include/futextest.h | 22 ---
1 file changed, 22 deletions(-)
diff --git a/tools/testing/selftests/futex/include/futextest.h
b/tools/testing/selftests/futex/include
These duplicate defines should automatically be picked up from kernel
headers. Use KHDR_INCLUDES to add kernel header files.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/capabilities/Makefile | 2 +-
tools/testing/selftests/capabilities/test_execve.c | 8
Remove duplicate defines which are already included in kernel headers.
MAX_PID_NS_LEVEL macro is used inside kernel only. It isn't exposed to
userspace. So it is never defined in test application. Remove #ifndef in
this case.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Make
Remove duplicate defines which are already defined in kernel headers and
re-definition isn't required.
Signed-off-by: Muhammad Usama Anjum
---
.../testing/selftests/core/close_range_test.c | 28 ---
1 file changed, 28 deletions(-)
diff --git a/tools/testing/selftests
These duplicate defines should automatically be picked up from kernel
headers.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Make the patch explanation better
---
tools/testing/selftests/firmware/fw_namespace.c | 4
1 file changed, 4 deletions(-)
diff --git a/tools/testing
On 10/6/23 1:33 PM, Muhammad Usama Anjum wrote:
> On 9/4/23 3:48 PM, Muhammad Usama Anjum wrote:
>> On 8/22/23 1:57 PM, Muhammad Usama Anjum wrote:
>>> Hi Shuah,
>>>
>>> Christian Brauner had picked [PATCH 4/6]. Others are still not picked.
>>> Please h
mm/mremap_dontunmap.c
> @@ -7,6 +7,7 @@
> */
> #define _GNU_SOURCE
> #include
> +#include
> #include
> #include
> #include
Tested-by: Muhammad Usama Anjum
--
BR,
Muhammad Usama Anjum
On 10/12/23 1:06 PM, Muhammad Usama Anjum wrote:
> On 10/12/23 11:40 AM, Samasth Norway Ananda wrote:
>> Definition for MREMAP_DONTUNMAP not present in the selftest for
>> mremap_dontunmap thus throwing an undeclared error when running make
>> on mm.
> Thanks for sending
odify_mm(mm, addr, addr + old_len, MM_SEAL_MREMAP)) {
> + ret = -EACCES;
> + goto out;
> + }
> +
> /*
>* Always allow a shrinking remap: that just unmaps
>* the unnecessary pages..
--
BR,
Muhammad Usama Anjum
nd don't unmap src addr.
> + ret2 = mremap(ptr, size, size, MREMAP_MAYMOVE | MREMAP_DONTUNMAP, 0);
> + if (seal) {
> + assert(ret2 == MAP_FAILED);
> + assert(errno == EACCES);
> + } else {
> + assert(ret2 != MAP_FAILED);
> + clean_single_address(ret2, size);
> + }
> +
> + clean_single_address(ptr, page_size);
> +}
> +
> +void test_seal_mremap_move_dontunmap_anyaddr(bool seal)
> +{
> + LOG_TEST_ENTER();
> + void *ptr;
> + void *newAddr;
> + unsigned long page_size = getpagesize();
> + unsigned long size = 4 * page_size;
> + int ret;
> + void *ret2;
> +
> + setup_single_address(size, &ptr);
> +
> + if (seal) {
> + ret = sys_mseal(ptr, size, MM_SEAL_MREMAP);
> + assert(!ret);
> + }
> +
> + /*
> + * The 0xdeaddead should not have effect on dest addr
> + * when MREMAP_DONTUNMAP is set.
> + */
> + ret2 = mremap(ptr, size, size, MREMAP_MAYMOVE | MREMAP_DONTUNMAP,
> + 0xdeaddead);
> + if (seal) {
> + assert(ret2 == MAP_FAILED);
> + assert(errno == EACCES);
> + } else {
> + assert(ret2 != MAP_FAILED);
> + assert((long)ret2 != 0xdeaddead);
> + clean_single_address(ret2, size);
> + }
> +
> + clean_single_address(ptr, page_size);
> +}
> +
> +int main(int argc, char **argv)
> +{
> + test_seal_invalid_input();
> + test_seal_addseals();
> + test_seal_addseals_combined();
> + test_seal_addseals_reject();
> + test_seal_unmapped_start();
> + test_seal_unmapped_middle();
> + test_seal_unmapped_end();
> + test_seal_multiple_vmas();
> + test_seal_split_start();
> + test_seal_split_end();
> +
> + test_seal_zero_length();
> + test_seal_twice();
> +
> + test_seal_mprotect(false);
> + test_seal_mprotect(true);
> +
> + test_seal_start_mprotect(false);
> + test_seal_start_mprotect(true);
> +
> + test_seal_end_mprotect(false);
> + test_seal_end_mprotect(true);
> +
> + test_seal_mprotect_unalign_len(false);
> + test_seal_mprotect_unalign_len(true);
> +
> + test_seal_mprotect_unalign_len_variant_2(false);
> + test_seal_mprotect_unalign_len_variant_2(true);
> +
> + test_seal_mprotect_two_vma(false);
> + test_seal_mprotect_two_vma(true);
> +
> + test_seal_mprotect_two_vma_with_split(false);
> + test_seal_mprotect_two_vma_with_split(true);
> +
> + test_seal_mprotect_partial_mprotect(false);
> + test_seal_mprotect_partial_mprotect(true);
> +
> + test_seal_mprotect_two_vma_with_gap(false);
> + test_seal_mprotect_two_vma_with_gap(true);
> +
> + test_seal_mprotect_merge(false);
> + test_seal_mprotect_merge(true);
> +
> + test_seal_mprotect_split(false);
> + test_seal_mprotect_split(true);
> +
> + test_seal_munmap(false);
> + test_seal_munmap(true);
> + test_seal_munmap_two_vma(false);
> + test_seal_munmap_two_vma(true);
> + test_seal_munmap_vma_with_gap(false);
> + test_seal_munmap_vma_with_gap(true);
> +
> + test_munmap_start_freed(false);
> + test_munmap_start_freed(true);
> + test_munmap_middle_freed(false);
> + test_munmap_middle_freed(true);
> + test_munmap_end_freed(false);
> + test_munmap_end_freed(true);
> +
> + test_seal_mremap_shrink(false);
> + test_seal_mremap_shrink(true);
> + test_seal_mremap_expand(false);
> + test_seal_mremap_expand(true);
> + test_seal_mremap_move(false);
> + test_seal_mremap_move(true);
> +
> + test_seal_mremap_shrink_fixed(false);
> + test_seal_mremap_shrink_fixed(true);
> + test_seal_mremap_expand_fixed(false);
> + test_seal_mremap_expand_fixed(true);
> + test_seal_mremap_move_fixed(false);
> + test_seal_mremap_move_fixed(true);
> + test_seal_mremap_move_dontunmap(false);
> + test_seal_mremap_move_dontunmap(true);
> + test_seal_mremap_move_fixed_zero(false);
> + test_seal_mremap_move_fixed_zero(true);
> + test_seal_mremap_move_dontunmap_anyaddr(false);
> + test_seal_mremap_move_dontunmap_anyaddr(true);
> +
> + test_seal_mmap_overwrite_prot(false);
> + test_seal_mmap_overwrite_prot(true);
> +
> + printf("OK\n");
> + return 0;
> +}
--
BR,
Muhammad Usama Anjum
On 10/20/23 8:23 PM, Peter Zijlstra wrote:
> On Fri, Oct 20, 2023 at 07:24:03PM +0500, Muhammad Usama Anjum wrote:
>
>> Please remove these. These macros would be picked up from the kernel
>> headers automatically.
>
> As per the previous discussions, how does that w
CV
Link: https://lore.kernel.org/all/7161219e-0223-d699-d6f3-81abd9abf...@arm.com
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/core/close_range_test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/core/close_range_test.c
b/tools/testing/selftests/core/close_ran
Hi Aishwarya,
On 10/24/23 5:43 PM, Aishwarya TCV wrote:
>
>
> On 06/10/2023 11:07, Muhammad Usama Anjum wrote:
>> Remove duplicate defines which are already defined in kernel headers and
>> re-definition isn't required.
>>
>> Signed-off-by: Muhamma
On 11/2/23 4:45 PM, Ryan Roberts wrote:
> On 21/08/2023 15:15, Muhammad Usama Anjum wrote:
>
> [...]
>
>> +
>> +
>> +int init_uffd(void)
>> +{
>> +struct uffdio_api uffdio_api;
>> +
>> +uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O
s")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/pagemap_ioctl.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c
b/tools/testing/selftests/mm/pagemap_ioctl.c
index 0161fb49fc6ef..f8685a2ea07
has type ‘int’ [-Wformat=]
Fixes: 46fd75d4a3c9 ("selftests: mm: add pagemap ioctl tests")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/pagemap_ioctl.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/mm/pagemap_
Soft reminder
On 10/24/23 8:51 PM, Muhammad Usama Anjum wrote:
> Correct header file is needed for getting CLOSE_RANGE_* macros.
> Previously it was tested with newer glibc which didn't show the need to
> include the header which was a mistake.
>
> Fixes: ec54424923cf (&quo
Soft reminder
On 11/29/23 4:34 PM, Muhammad Usama Anjum wrote:
> Soft reminder
>
> On 10/24/23 8:51 PM, Muhammad Usama Anjum wrote:
>> Correct header file is needed for getting CLOSE_RANGE_* macros.
>> Previously it was tested with newer glibc which didn't show the nee
the selftests build. Additional patches
> will be required in order to change over to not requiring the kernel
> headers.
>
> [1]
> https://lore.kernel.org/20231208221007.go28...@noisy.programming.kicks-ass.net
>
> Cc: Anders Roxell
> Cc: Muhammad Usama Anjum
> Cc:
On 12/12/23 12:00 AM, John Hubbard wrote:
> On 12/11/23 03:00, Muhammad Usama Anjum wrote:
>> On 12/9/23 7:01 AM, John Hubbard wrote:
>>> This reverts commit 9fc96c7c19df ("selftests: error out if kernel header
>>> files are not yet built").
>> I d
};
-#endif /* _UAPI_LINUX_FS_H */
+#endif /* _LINUX_FS_H */
>
> I really like this, at first reading anyway.
>
> Muhammad, Shuah, others, what do you think?
>
> +Cc: Muhammad Usama Anjum
>
>
> thanks,
--
BR,
Muhammad Usama Anjum
le of page_size.
Fix this by flooring the length to be allocated with mmap() to the
previous multiple of the page_size.
Fixes: 76fe17ef588a ("secretmem: test: add basic selftest for memfd_secret(2)")
Reported-by: "kernelci.org bot"
Signed-off-by: Muhammad Usama Anj
Hi Andrew,
On 12/15/23 12:40 AM, Andrew Morton wrote:
> On Thu, 14 Dec 2023 15:19:30 +0500 Muhammad Usama Anjum
> wrote:
>
>> The "locked-in-memory size" limit per process can be non-multiple of
>> page_size. The mmap() fails if we try to allocate locked-in-
On 12/15/23 3:59 PM, Mike Rapoport wrote:
> On Thu, Dec 14, 2023 at 03:19:30PM +0500, Muhammad Usama Anjum wrote:
>> The "locked-in-memory size" limit per process can be non-multiple of
>> page_size. The mmap() fails if we try to allocate locked-in-memory
>> with sa
Hi Konstantin,
There are some errors being reported in KernelCI:
https://linux.kernelci.org/test/plan/id/657ab2240c761c0bd1e134ee/
The following sub-tests are failing:
landlock_net_test_protocol_no_sandbox_with_ipv6_tcp_bind_unspec
landlock_net_test_protocol_no_sandbox_with_ipv6_udp_bind_unspec
l
nt with other
> tests, suggested by Hangbin
>
> Link:
> https://lore.kernel.org/all/20231202020110.362433-1-liuhang...@gmail.com/ [1]
> Link:
> https://lore.kernel.org/all/20231219094856.1740079-1-liuhang...@gmail.com/ [2]
> Reported-by: kernel test robot
> Signed-off-by: Y
pu;
> __vdso_clock_getres;
> __vdso_clock_gettime;
> __vdso_gettimeofday;
> __vdso_rt_sigreturn;
> local: *;
> };
> }
>
> so VDSO_VERSION should be 6 and VDSO_NAMES should be 1 for LoongArch,
> add them to fix the bu
st way.
>
> Since each architecture has already defined names and versions in
> vdso_config.h, it is proper to include vdso_config.h to get version
> and name for all archs.
>
> Signed-off-by: Tiezhu Yang
Reviewed-by: Muhammad Usama Anjum
Tested on x86, works fine.
Tested-by
please review and merge them for the upcoming merge window?
People may be on vacation. I'm also waiting to hear back on my patches.
Lets see when they get back and start picking up patches.
>
> https://lore.kernel.org/lkml/20231213012300.5640-1-yangtie...@loongson.cn/
>
> Thanks,
> Tiezhu
>
>
--
BR,
Muhammad Usama Anjum
ed -Wall $(KHDR_INCLUDES)
>
> -uevent_filtering: uevent_filtering.c ../kselftest.h ../kselftest_harness.h
> - $(CC) $(CFLAGS) $< -o $@
> +TEST_GEN_PROGS = uevent_filtering
>
> -TEST_PROGS += $(BINARIES)
> -EXTRA_CLEAN := $(BINARIES)
> -
> -all: $(BINARIES)
> +include ../lib.mk
--
BR,
Muhammad Usama Anjum
ULL. This could
> be trapped by KUNIT_ASSERT_NOT_NULL() but that would terminate the test
> at that point. It's preferable that the KUNIT_EXPECT_STR*() macros can
> handle NULL pointers as a failure.
>
> Signed-off-by: Richard Fitzgerald
Reviewed-by: Muhammad Usama Anjum
> -
;kunit: add ability to run tests after boot using
> debugfs")
Reviewed-by: Muhammad Usama Anjum
> ---
> lib/kunit/test.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/kunit/test.c b/lib/kunit/test.c
> index e803d998e855..ea7f0913e5
On 12/15/23 6:21 PM, Laura Nao wrote:
> Add new basic kselftest that checks if the available rust sample modules
> can be added and removed correctly.
>
> Signed-off-by: Laura Nao
Reviewed-by: Muhammad Usama Anjum
Tested-by: Muhammad Usama Anjum
> ---
I wasn't CC-ed on the patch even though I'd reviewed the earlier revision.
On 12/13/23 4:17 AM, jef...@chromium.org wrote:
> From: Jeff Xu
>
> selftest for memory sealing change in mmap() and mseal().
>
> Signed-off-by: Jeff Xu
> ---
> tools/testing/selftests/mm/.gitignore |1 +
> tool
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/compaction_test.c | 91 ++--
1 file changed, 44 insertions(+), 47 deletions
The test depends on writing to nr_hugepages which isn't possible without
root privileges. So skip the test in this case.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/compaction_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/te
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/gup_test.c | 70 +++
1 file changed, 38 insertions(+), 32 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugepage-mmap.c | 23 --
1 file changed, 13 insertions(+), 10 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Fix typo
- Update subject
---
tools/testing/selftests/mm/gup_test.c | 65
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugepage-mremap.c | 87
1 file changed, 35 insertions(+), 52 deletions
Kind reminder
On 12/11/23 4:01 PM, Muhammad Usama Anjum wrote:
> Soft reminder
>
> On 11/29/23 4:34 PM, Muhammad Usama Anjum wrote:
>> Soft reminder
>>
>> On 10/24/23 8:51 PM, Muhammad Usama Anjum wrote:
>>> Correct header file is needed for getting CLOSE_R
You have used ksft_print_msg() only. Can you please udpate the test to use
more TAP macros for increased readability and printing test output. We
don't want to terminate the test if one test fails because of assert. We
want the sub-tests to get executed indepdendent of other tests.
ksft_test_resul
Fix following build warning:
warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type
‘long long unsigned int’
Fixes: a4cb3b243343 ("selftests: mm: add a test for remapping to area
immediately after existing mapping")
Signed-off-by: Muhammad Usama Anjum
---
too
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
The "." was being printed inside for loop to indicate the writes
progress. This was extraneous and hence removed in the patch.
Signed-off-by: Muha
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugepage-vmemmap.c | 36 +--
1 file changed, 17 insertions(+), 19 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugetlb-madvise.c | 209 +++
1 file changed, 81 insertions(+), 128
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/khugepaged.c | 378 ++--
1 file changed, 160 insertions(+), 218
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Tested this by reverting the patch a08c7193e4f18dc8508f2d07d0de2c5b94cb39a3
("mm/filemap: remove hugetlb special c
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/ksm_tests.c | 682 ++---
1 file changed, 276 insertions(+), 406
Add configurations which are needed for
- hugetlb-read-hwpoison
- ksm_functional_test and ksm_test
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/config | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/mm/config
b/tools/testing/selftests/mm
Sorry, forgot to remvove 2 lines. I'll resend if there aren't any comments
until tomorrow.
On 1/11/24 4:56 PM, Muhammad Usama Anjum wrote:
> Conform the layout, informational and status messages to TAP. No
> functional change is intended other than the layout of output messages.
On 1/12/24 2:14 AM, Andrew Morton wrote:
> On Thu, 11 Jan 2024 13:20:38 +0500 Muhammad Usama Anjum
> wrote:
>
>> Fix following build warning:
>> warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type
>> ‘long long unsigned int’
>>
>
: a4cb3b243343 ("selftests: mm: add a test for remapping to area
immediately after existing mapping")
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Don't just fix the print format, instead use different variables
---
tools/testing/selftests/mm/mremap_test.c | 27 -
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
The "." was being printed inside for loop to indicate the writes
progress. This was extraneous and hence removed in the patch.
Signed-off-by: Muha
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugepage-vmemmap.c | 36 +--
1 file changed, 17 insertions(+), 19 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugetlb-madvise.c | 209 +++
1 file changed, 81 insertions(+), 128
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Remove commented out lines of code
---
tools/testing/selftests/mm/khugepaged.c | 381
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Tested this by reverting the patch a08c7193e4f18dc8508f2d07d0de2c5b94cb39a3
("mm/filemap: remove hugetlb special c
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/ksm_tests.c | 682 ++---
1 file changed, 276 insertions(+), 406
Add configurations which are needed for
- hugetlb-read-hwpoison
- ksm_functional_test and ksm_test
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/config | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/mm/config
b/tools/testing/selftests/mm
On 1/13/24 6:08 AM, Jiaqi Yan wrote:
> On Thu, Jan 11, 2024 at 11:21 PM Muhammad Usama Anjum
> wrote:
>>
>> Conform the layout, informational and status messages to TAP. No
>> functional change is intended other than the layout of output messages.
>>
>>
On 1/15/24 11:52 AM, Jiaqi Yan wrote:
> On Sun, Jan 14, 2024 at 10:32 PM Muhammad Usama Anjum
> wrote:
>>
>> On 1/13/24 6:08 AM, Jiaqi Yan wrote:
>>> On Thu, Jan 11, 2024 at 11:21 PM Muhammad Usama Anjum
>>> wrote:
>>>>
>>>> Conf
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
The "." was being printed inside for loop to indicate the writes
progress. This was extraneous and hence removed in the patch.
Signed-off-by: Muha
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugepage-vmemmap.c | 36 +--
1 file changed, 17 insertions(+), 19 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugetlb-madvise.c | 209 +++
1 file changed, 81 insertions(+), 128
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Remove commented out lines of code
---
tools/testing/selftests/mm/khugepaged.c | 381
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Changes in v3:
- Use ksft_perror as short hand instead of missing strerror(errno) at
one place
Tested this by
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/ksm_tests.c | 682 ++---
1 file changed, 276 insertions(+), 406
Add configurations which are needed for
- hugetlb-read-hwpoison
- ksm_functional_test and ksm_test
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/config | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/mm/config
b/tools/testing/selftests/mm
("selftests: include bonding tests into the kselftest
> infra")
> Signed-off-by: Jakub Kicinski
Acked-by: Muhammad Usama Anjum
> ---
> CC: j.vosbu...@gmail.com
> CC: a...@greyhouse.net
> CC: sh...@kernel.org
> CC: bpoir...@nvidia.com
> CC: jon.toppins+li...@
: Syntax error: "(" unexpected
Switch to using /bin/bash instead of /bin/sh. Make the switch for
write_hugetlb_memory.sh as well which is called from
charge_reserved_hugetlb.sh.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/charge_reserved_hugetlb.sh | 2 +-
too
Add missing tests to run_vmtests.sh. The mm kselftests are run through
run_vmtests.sh. If a test isn't present in this script, it'll not run
with run_tests or `make -C tools/testing/selftests/mm run_tests`.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/run_vmte
On 1/16/24 9:52 PM, David Laight wrote:
> From: Muhammad Usama Anjum
>> Sent: 16 January 2024 09:05
>>
>> Running charge_reserved_hugetlb.sh generates errors if sh is set to
>> dash:
>>
>> /charge_reserved_hugetlb.sh: 9: [[: not found
>> /
On 1/16/24 10:07 PM, Jiaqi Yan wrote:
> On Sun, Jan 14, 2024 at 11:33 PM Muhammad Usama Anjum
> wrote:
>>
>> Conform the layout, informational and status messages to TAP. No
>> functional change is intended other than the layout of output messages.
>>
>>
drew has dropped this patch for now.
>
> On 16/01/2024 09:06, Muhammad Usama Anjum wrote:
>> Add missing tests to run_vmtests.sh. The mm kselftests are run through
>> run_vmtests.sh. If a test isn't present in this script, it'll not run
>> with run_tests or `make
Remove sudo as some test running environments may not have sudo
available. Instead skip the test if root privileges aren't available in
the test.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Added this patch in v2
We are allocating 2*RLIMIT_MEMLOCK.rlim_max memory and
Add missing tests to run_vmtests.sh. The mm kselftests are run through
run_vmtests.sh. If a test isn't present in this script, it'll not run
with run_tests or `make -C tools/testing/selftests/mm run_tests`.
Cc: Ryan Roberts
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
can tell me what the new requirement
> is:
I'm not sure about the exact requirement of the number of hugetlb for these
tests. But I specify hugepages=1000 and tests work for me.
I've sent v2 [1]. Would it be possible to run your CI on that and share
results before we merge that one?
[1]
https://lore.kernel.org/all/20240123073615.920324-1-usama.an...@collabora.com
>
> hugepagesz=1G hugepages=0:2,1:2 hugepagesz=32M hugepages=0:2,1:2
> default_hugepagesz=2M hugepages=0:64,1:64 hugepagesz=64K hugepages=0:2,1:2
>
> Thanks,
> Ryan
>
--
BR,
Muhammad Usama Anjum
Hi Andrew,
There hasn't been any comment on these. I guess, they can be picked up now?
Thanks,
On 1/15/24 12:32 PM, Muhammad Usama Anjum wrote:
> Conform the layout, informational and status messages to TAP. No
> functional change is intended other than the layout of output message
Hi,
Can anybody please pick this patch? This was fixing genuine regression in
some build system.
Thanks,
On 10/24/23 8:51 PM, Muhammad Usama Anjum wrote:
> Correct header file is needed for getting CLOSE_RANGE_* macros.
> Previously it was tested with newer glibc which didn't show
Hi Ryan,
Thank you so much for reviewing and getting involved.
On 1/23/24 2:33 PM, Ryan Roberts wrote:
> On 23/01/2024 07:36, Muhammad Usama Anjum wrote:
>> Add missing tests to run_vmtests.sh. The mm kselftests are run through
>> run_vmtests.sh. If a test isn't present in th
v2:
https://lore.kernel.org/all/20240123073615.920324-1-usama.an...@collabora.com
Muhammad Usama Anjum (5):
selftests/mm: hugetlb_reparenting_test: do not unmount
selftests/mm: run_vmtests: remove sudo and conform to tap
selftests/mm: save and restore nr_hugepages value
selftests/
cgroup setting")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugetlb_reparenting_test.sh | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/hugetlb_reparenting_test.sh
b/tools/testing/selftests/mm/hugetlb_reparenting_test.sh
Remove sudo as some test running environments may not have sudo
available. Instead skip the test if root privileges aren't available in
the test.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Added this patch in v2
We are allocating 2*RLIMIT_MEMLOCK.rlim_max memory and
Save and restore nr_hugepages before changing it during the test. A test
should not change system wide settings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/charge_reserved_hugetlb.sh | 4
tools/testing/selftests/mm/hugetlb_reparenting_test.sh | 3 +++
2 files
Save and restore nr_hugepages before changing it during the test. A test
should not change system wide settings.
Fixes: 5f23f6d082a9 ("x86/pkeys: Add self-tests")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/protection_keys.c | 34
1 file c
Add missing tests to run_vmtests.sh. The mm kselftests are run through
run_vmtests.sh. If a test isn't present in this script, it'll not run
with run_tests or `make -C tools/testing/selftests/mm run_tests`.
Cc: Ryan Roberts
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v3:
- Rebase to next-20240125
- Update newly updated code
---
tools/testing/selftests/mm/hugepage
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v3:
- Rebased on top of next-20240125
---
tools/testing/selftests/mm/hugetlb-madvise.c | 207
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Skip test if root privileges aren't provided.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v3:
- Rebased on top of next-20240125
- Skip test if
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v3:
- Rebased on top of next-20240125
- Resolves minor conflict
---
tools/testing/selftests/mm
Add configurations which are needed for
- hugetlb-read-hwpoison
- ksm_functional_test and ksm_test
Signed-off-by: Muhammad Usama Anjum
---
Changes since v3:
- Rebased on top of next-20240125
---
tools/testing/selftests/mm/config | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Reviewed-by: Jiaqi Yan
Signed-off-by: Muhammad Usama Anjum
---
Changes since v3:
- Rebased on top of next-20240125
- Added reviewed-by tag
- Tested this on
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
The "." was being printed inside for loop to indicate the writes
progress. This was extraneous and hence removed in the patch.
Signed-off-by: Muha
On 1/29/24 4:52 PM, Breno Leitao wrote:
> The usage of run_vmtests.sh does not include hugetlb, which is a valid
> test category.
>
> Add the 'hugetlb' to the usage of run_vmtests.sh.
>
> Signed-off-by: Breno Leitao
Reviewed-by: Muhammad Usama Anjum
> --
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
While at it, convert commenting style from // to /**/.
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/mm/map_fixed_noreplace.c| 96
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/map_hugetlb.c | 42 +++-
1 file changed, 20 insertions(+), 22 deletions
1 - 100 of 477 matches
Mail list logo