[PATCH v3 0/2] selftests/mm: run the XFS-backed THP tests when xfs is a module
From: Qiliang Yuan
Date: Thu Oct 29 2026 - 02:24:59 EST
run_vmtests.sh only creates the XFS that "khugepaged all:file" and the
pagecache folio split cases of split_huge_page_test need when xfs is
already registered, so with xfs built as a module and not loaded yet
those tests are all skipped.
Patch 1 adds load_module(), which records the modules the script loads
and unloads them again before it exits, and moves hwpoison_inject over
to it. Patch 2 loads xfs through it.
Signed-off-by: Qiliang Yuan <odys.yuan@xxxxxxxxx>
---
V2 -> V3:
- Match xfs as a whole word so that selinuxfs and vxfs do not count
(Jose A. Perez de Azpillaga)
- Rebase onto 6593a15af108 ("selftests/mm: skip khugepaged file tests
if mkfs.xfs is unavailable")
V1 -> V2:
- Add load_module() and unload what the script loaded on exit (Zi Yan)
- Unload xfs again after the run (Zi Yan)
- Rebase onto mainline
v2: https://lore.kernel.org/r/20261017-bug-selftests-mm-run-vmtests-xfs-modprobe-v2-0-cbb36b014322@xxxxxxxxx
v1: https://lore.kernel.org/r/20261016-bug-selftests-mm-run-vmtests-xfs-modprobe-v1-1-b97dfc79e97a@xxxxxxxxx
---
Qiliang Yuan (2):
selftests/mm: track the modules run_vmtests.sh loads
selftests/mm: load xfs before checking for it in run_vmtests.sh
tools/testing/selftests/mm/run_vmtests.sh | 33 ++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
---
base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8
change-id: 20261016-bug-selftests-mm-run-vmtests-xfs-modprobe-de0697d4c4e9
Best regards,
--
Qiliang Yuan <odys.yuan@xxxxxxxxx>