uffd-wp-mremap and mremap_test never print the TAP header (and mremap_test skips with a bare exit(KSFT_SKIP) rather than a KTAP skip), so their output is not valid KTAP; hugetlb-soft-offline toggles enable_soft_offline during the run and leaves it disabled afterwards.
Tested on x86_64. Song Hu (3): selftests/mm: emit TAP header in uffd-wp-mremap selftests/mm: emit TAP header and use TAP skip in mremap_test selftests/mm: restore enable_soft_offline in hugetlb-soft-offline .../selftests/mm/hugetlb-soft-offline.c | 35 ++++++---------- tools/testing/selftests/mm/mremap_test.c | 43 +++++++++++++---------- tools/testing/selftests/mm/uffd-wp-mremap.c | 2 + 3 files changed, 39 insertions(+), 41 deletions(-) --- Changes in v3, per Usama Anjum's review of v2 patch 2/3: - mremap_test: cache mmap_min_addr in main() before ksft_set_plan(), so the skip paths in get_mmap_min_addr() are taken before the plan is set; a skip after the plan leaves the run with fewer tests than planned. Changes in v2, per review feedback from Mike Rapoport, Sarthak Sharma and the Sashiko AI review Andrew Morton pointed at: - mremap_test: save errno before fclose() in get_mmap_min_addr() so strerror() reports the actual failure, and split the ksft_*() messages embedding "\n\t" so continuation lines get the "# " prefix. - hugetlb-soft-offline: restore enable_soft_offline from an atexit() handler so it also runs on early exits, and use read_num()/write_num() from vm_util instead of the hand-rolled helpers. v2: https://lore.kernel.org/all/[email protected]/ v1: https://lore.kernel.org/all/[email protected]/

