mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-24 17:23:29 -04:00
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>
This commit is contained in:
committed by
Andrew Morton
parent
a4818a8beb
commit
6ce964c02f
@@ -1,6 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Makefile for mm selftests
|
||||
|
||||
# IMPORTANT: If you add a new test CATEGORY please add a simple wrapper
|
||||
# script so kunit knows to run it, and add it to the list below.
|
||||
# If you do not YOUR TESTS WILL NOT RUN IN THE CI.
|
||||
|
||||
LOCAL_HDRS += $(selfdir)/mm/local_config.h $(top_srcdir)/mm/gup_test.h
|
||||
LOCAL_HDRS += $(selfdir)/mm/mseal_helpers.h
|
||||
|
||||
@@ -139,7 +143,33 @@ TEST_GEN_FILES += va_high_addr_switch
|
||||
TEST_GEN_FILES += write_to_hugetlbfs
|
||||
endif
|
||||
|
||||
TEST_PROGS := run_vmtests.sh
|
||||
TEST_PROGS += ksft_compaction.sh
|
||||
TEST_PROGS += ksft_cow.sh
|
||||
TEST_PROGS += ksft_gup_test.sh
|
||||
TEST_PROGS += ksft_hmm.sh
|
||||
TEST_PROGS += ksft_hugetlb.sh
|
||||
TEST_PROGS += ksft_hugevm.sh
|
||||
TEST_PROGS += ksft_ksm.sh
|
||||
TEST_PROGS += ksft_ksm_numa.sh
|
||||
TEST_PROGS += ksft_madv_guard.sh
|
||||
TEST_PROGS += ksft_madv_populate.sh
|
||||
TEST_PROGS += ksft_memfd_secret.sh
|
||||
TEST_PROGS += ksft_migration.sh
|
||||
TEST_PROGS += ksft_mkdirty.sh
|
||||
TEST_PROGS += ksft_mlock.sh
|
||||
TEST_PROGS += ksft_mmap.sh
|
||||
TEST_PROGS += ksft_mremap.sh
|
||||
TEST_PROGS += ksft_pagemap.sh
|
||||
TEST_PROGS += ksft_pfnmap.sh
|
||||
TEST_PROGS += ksft_pkey.sh
|
||||
TEST_PROGS += ksft_process_madv.sh
|
||||
TEST_PROGS += ksft_process_mrelease.sh
|
||||
TEST_PROGS += ksft_rmap.sh
|
||||
TEST_PROGS += ksft_soft_dirty.sh
|
||||
TEST_PROGS += ksft_thp.sh
|
||||
TEST_PROGS += ksft_userfaultfd.sh
|
||||
TEST_PROGS += ksft_vma_merge.sh
|
||||
TEST_PROGS += ksft_vmalloc.sh
|
||||
|
||||
TEST_FILES := test_vmalloc.sh
|
||||
TEST_FILES += test_hmm.sh
|
||||
@@ -147,6 +177,7 @@ TEST_FILES += va_high_addr_switch.sh
|
||||
TEST_FILES += charge_reserved_hugetlb.sh
|
||||
TEST_FILES += hugetlb_reparenting_test.sh
|
||||
TEST_FILES += test_page_frag.sh
|
||||
TEST_FILES += run_vmtests.sh
|
||||
|
||||
# required by charge_reserved_hugetlb.sh
|
||||
TEST_FILES += write_hugetlb_memory.sh
|
||||
|
||||
4
tools/testing/selftests/mm/ksft_compaction.sh
Executable file
4
tools/testing/selftests/mm/ksft_compaction.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t compaction
|
||||
4
tools/testing/selftests/mm/ksft_cow.sh
Executable file
4
tools/testing/selftests/mm/ksft_cow.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t cow
|
||||
4
tools/testing/selftests/mm/ksft_gup_test.sh
Executable file
4
tools/testing/selftests/mm/ksft_gup_test.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t gup_test
|
||||
4
tools/testing/selftests/mm/ksft_hmm.sh
Executable file
4
tools/testing/selftests/mm/ksft_hmm.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t hmm
|
||||
4
tools/testing/selftests/mm/ksft_hugetlb.sh
Executable file
4
tools/testing/selftests/mm/ksft_hugetlb.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t hugetlb
|
||||
4
tools/testing/selftests/mm/ksft_hugevm.sh
Executable file
4
tools/testing/selftests/mm/ksft_hugevm.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t hugevm
|
||||
4
tools/testing/selftests/mm/ksft_ksm.sh
Executable file
4
tools/testing/selftests/mm/ksft_ksm.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t ksm
|
||||
4
tools/testing/selftests/mm/ksft_ksm_numa.sh
Executable file
4
tools/testing/selftests/mm/ksft_ksm_numa.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t ksm_numa
|
||||
4
tools/testing/selftests/mm/ksft_madv_guard.sh
Executable file
4
tools/testing/selftests/mm/ksft_madv_guard.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t madv_guard
|
||||
4
tools/testing/selftests/mm/ksft_madv_populate.sh
Executable file
4
tools/testing/selftests/mm/ksft_madv_populate.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t madv_populate
|
||||
4
tools/testing/selftests/mm/ksft_mdwe.sh
Executable file
4
tools/testing/selftests/mm/ksft_mdwe.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t mdwe
|
||||
4
tools/testing/selftests/mm/ksft_memfd_secret.sh
Executable file
4
tools/testing/selftests/mm/ksft_memfd_secret.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t memfd_secret
|
||||
4
tools/testing/selftests/mm/ksft_migration.sh
Executable file
4
tools/testing/selftests/mm/ksft_migration.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t migration
|
||||
4
tools/testing/selftests/mm/ksft_mkdirty.sh
Executable file
4
tools/testing/selftests/mm/ksft_mkdirty.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t mkdirty
|
||||
4
tools/testing/selftests/mm/ksft_mlock.sh
Executable file
4
tools/testing/selftests/mm/ksft_mlock.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t mlock
|
||||
4
tools/testing/selftests/mm/ksft_mmap.sh
Executable file
4
tools/testing/selftests/mm/ksft_mmap.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t mmap
|
||||
4
tools/testing/selftests/mm/ksft_mremap.sh
Executable file
4
tools/testing/selftests/mm/ksft_mremap.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t mremap
|
||||
4
tools/testing/selftests/mm/ksft_page_frag.sh
Executable file
4
tools/testing/selftests/mm/ksft_page_frag.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t page_frag
|
||||
4
tools/testing/selftests/mm/ksft_pagemap.sh
Executable file
4
tools/testing/selftests/mm/ksft_pagemap.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t pagemap
|
||||
4
tools/testing/selftests/mm/ksft_pfnmap.sh
Executable file
4
tools/testing/selftests/mm/ksft_pfnmap.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t pfnmap
|
||||
4
tools/testing/selftests/mm/ksft_pkey.sh
Executable file
4
tools/testing/selftests/mm/ksft_pkey.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t pkey
|
||||
4
tools/testing/selftests/mm/ksft_process_madv.sh
Executable file
4
tools/testing/selftests/mm/ksft_process_madv.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t mmap
|
||||
4
tools/testing/selftests/mm/ksft_process_mrelease.sh
Executable file
4
tools/testing/selftests/mm/ksft_process_mrelease.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t process_mrelease
|
||||
4
tools/testing/selftests/mm/ksft_rmap.sh
Executable file
4
tools/testing/selftests/mm/ksft_rmap.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t rmap
|
||||
4
tools/testing/selftests/mm/ksft_soft_dirty.sh
Executable file
4
tools/testing/selftests/mm/ksft_soft_dirty.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t soft_dirty
|
||||
4
tools/testing/selftests/mm/ksft_thp.sh
Executable file
4
tools/testing/selftests/mm/ksft_thp.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t thp
|
||||
4
tools/testing/selftests/mm/ksft_userfaultfd.sh
Executable file
4
tools/testing/selftests/mm/ksft_userfaultfd.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t userfaultfd
|
||||
4
tools/testing/selftests/mm/ksft_vma_merge.sh
Executable file
4
tools/testing/selftests/mm/ksft_vma_merge.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t vma_merge
|
||||
4
tools/testing/selftests/mm/ksft_vmalloc.sh
Executable file
4
tools/testing/selftests/mm/ksft_vmalloc.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
./run_vmtests.sh -t vmalloc
|
||||
@@ -2,6 +2,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Please run as root
|
||||
|
||||
# IMPORTANT: If you add a new test CATEGORY please add a simple wrapper
|
||||
# script so kunit knows to run it, and add it to the list below.
|
||||
# If you do not YOUR TESTS WILL NOT RUN IN THE CI.
|
||||
|
||||
# Kselftest framework requirement - SKIP code is 4.
|
||||
ksft_skip=4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user