[PATCH v2 0/5] selftests/mm: skip several tests when thp is not available

Chunyu Hu
2026-03-16T04:43:58Z

There are several tests requires transprarent hugepages, when run on thp
disabled kernel such as realtime kernel, there will be false negative.
Mark those tests as skip when thp is not available.

Changes in v2:
- replace 'false postive' with 'false negative' in cover letter
- patch 1 and patch 2 add reviewed-by/acked-by
- new patch 3 to add write_file() in vm_util as a common helper
- patch 4 removed the {} in if block, removed the write_file helper
rename chunk in v1. Add reviewed-by
- patch 5 move the exit chunk to the front of ksft_print_headers() as
suggested by David. Add review by.

Chunyu Hu (5):
selftests/mm/guard-regions: skip collapse test when thp not enabled
selftests/mm: soft-dirty: skip two tests when thp is not available
selftests/mm: move write_file helper to vm_util
selftests/mm: split_huge_page_test: skip the test when thp is not
available
selftests/mm: transhuge_stress: skip the test when thp not available

tools/testing/selftests/mm/guard-regions.c | 4 ++++
tools/testing/selftests/mm/soft-dirty.c | 4 +++-
.../selftests/mm/split_huge_page_test.c | 19 ++++-----------
tools/testing/selftests/mm/thp_settings.c | 24 +------------------
tools/testing/selftests/mm/thp_settings.h | 1 -
tools/testing/selftests/mm/transhuge-stress.c | 4 ++++
tools/testing/selftests/mm/vm_util.c | 16 +++++++++++++
tools/testing/selftests/mm/vm_util.h | 2 ++
8 files changed, 34 insertions(+), 40 deletions(-)

base-commit: f338e77383789c0cae23ca3d48adcc5e9e137e3c
--
2.53.0