]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/mm: deduplicate default page size test results in thuge-gen
authorMark Brown <broonie@kernel.org>
Thu, 15 May 2025 09:36:14 +0000 (11:36 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 1 Jun 2025 05:46:08 +0000 (22:46 -0700)
The thuge-gen test program runs mmap() and shmget() tests for both every
available page size and the default page size, resulting in two tests for
the default size.  These tests are distinct since the flags in the default
case do not specify an explicit size, add the flags to the test name that
is logged to deduplicate.

Link: https://lkml.kernel.org/r/20250515-selfests-mm-thuge-gen-dup-v1-1-057d2836553f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Dev Jain <dev.jain@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/thuge-gen.c

index cd5174d735be405220d99ae796a3768f53df6ea4..a41bc1234b375dae2f7d0c6329d6cf72e290523a 100644 (file)
@@ -127,7 +127,7 @@ void test_mmap(unsigned long size, unsigned flags)
 
        show(size);
        ksft_test_result(size == getpagesize() || (before - after) == NUM_PAGES,
-                        "%s mmap %lu\n", __func__, size);
+                        "%s mmap %lu %x\n", __func__, size, flags);
 
        if (munmap(map, size * NUM_PAGES))
                ksft_exit_fail_msg("%s: unmap %s\n", __func__, strerror(errno));
@@ -165,7 +165,7 @@ void test_shmget(unsigned long size, unsigned flags)
 
        show(size);
        ksft_test_result(size == getpagesize() || (before - after) == NUM_PAGES,
-                        "%s: mmap %lu\n", __func__, size);
+                        "%s: mmap %lu %x\n", __func__, size, flags);
        if (shmdt(map))
                ksft_exit_fail_msg("%s: shmdt: %s\n", __func__, strerror(errno));
 }