]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
lib/test_vmalloc.c: restrict default test mask to avoid test warnings
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Mon, 23 Jun 2025 18:40:35 +0000 (20:40 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 10 Jul 2025 05:42:21 +0000 (22:42 -0700)
When the vmalloc test is built into the kernel, it runs automatically
during the boot.  The current-default "run_test_mask" includes all test
cases, including those which are designed to fail and which trigger kernel
warnings.

These kernel splats can be misinterpreted as actual kernel bugs, leading
to false alarms and unnecessary reports.

To address this, limit the default test mask to only the first few tests
which are expected to pass cleanly.  These tests are safe and should not
generate any warnings unless there is a real bug.

Users who wish to explicitly run specific test cases have to pass the
run_test_mask as a boot parameter or at module load time.

Link: https://lkml.kernel.org/r/20250623184035.581229-2-urezki@gmail.com
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Cc: Harry Yoo <harry.yoo@oracle.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: David Wang <00107082@163.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/test_vmalloc.c

index 7264781750c960744feca3bd6ea0f6f68b2f97be..c1966cf72ab89b46937dd1ae3f0f1685381d376e 100644 (file)
@@ -41,7 +41,7 @@ __param(int, nr_pages, 0,
 __param(bool, use_huge, false,
        "Use vmalloc_huge in fix_size_alloc_test");
 
-__param(int, run_test_mask, INT_MAX,
+__param(int, run_test_mask, 7,
        "Set tests specified in the mask.\n\n"
                "\t\tid: 1,    name: fix_size_alloc_test\n"
                "\t\tid: 2,    name: full_fit_alloc_test\n"