]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/mm: have the harness run each test category separately
authorMark Brown <broonie@kernel.org>
Fri, 23 Jan 2026 22:39:24 +0000 (22:39 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 31 Jan 2026 22:22:53 +0000 (14:22 -0800)
commit6ce964c02f1cb49b4dbb76507948c004d5a0b4fe
tree865bd4b5c0137ec4e3508855ddd6aceaa534ed6e
parenta4818a8beb158f719581352f80d5b88f938f5457
selftests/mm: have the harness run each test category separately

At present the mm selftests are integrated into the kselftest harness by
having it run run_vmtest.sh and letting it pick it's default set of tests
to invoke, rather than by telling the kselftest framework about each test
program individually as is more standard.  This has some unfortunate
interactions with the kselftest harness:

 - If any of the tests hangs the harness will kill the entire mm
   selftests run rather than just the individual test, meaning no
   further tests get run.
 - The timeout applied by the harness is applied to the whole run rather
   than an individual test which frequently leads to the suite not being
   completed in production testing.

Deploy a crude but effective mitigation for these issues by telling the
kselftest framework to run each of the test categories that run_vmtests.sh
has separately.  Since kselftest really wants to run test programs this is
done by providing a trivial wrapper script for each categorty that invokes
run_vmtest.sh, this is not a thing of great elegence but it is clear and
simple.  Since run_vmtests.sh is doing runtime support detection, scenario
enumeration and setup for many of the tests we can't consistently tell the
framework about the individual test programs.

This has the side effect of reordering the tests, hopefully the testing
is not overly sensitive to this.

Link: https://lkml.kernel.org/r/20260123-selftests-mm-run-suites-separately-v2-1-3e934edacbfa@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
31 files changed:
tools/testing/selftests/mm/Makefile
tools/testing/selftests/mm/ksft_compaction.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_cow.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_gup_test.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_hmm.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_hugetlb.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_hugevm.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_ksm.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_ksm_numa.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_madv_guard.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_madv_populate.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_mdwe.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_memfd_secret.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_migration.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_mkdirty.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_mlock.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_mmap.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_mremap.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_page_frag.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_pagemap.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_pfnmap.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_pkey.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_process_madv.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_process_mrelease.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_rmap.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_soft_dirty.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_thp.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_userfaultfd.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_vma_merge.sh [new file with mode: 0755]
tools/testing/selftests/mm/ksft_vmalloc.sh [new file with mode: 0755]
tools/testing/selftests/mm/run_vmtests.sh