Re: [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file
From: Zi Yan
Date: Thu Nov 05 2026 - 10:48:21 EST
On 4 Nov 2026, at 22:02, Sasha Levin wrote:
> Every case in split_huge_page_test goes through
> /sys/kernel/debug/split_huge_pages. When that file does not exist,
> because debugfs is not mounted or the kernel has no CONFIG_DEBUG_FS, the
> first write bails out of the whole test and it is reported as a failure:
>
> Bail out! write_file(/sys/kernel/debug/split_huge_pages): No such file or directory
>
> Skip the test in that case.
>
> Fixes: fa6c02315f74 ("mm: huge_memory: a new debugfs interface for splitting THP tests")
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---
> Found with KernelCI's NVIDIA lab, which runs the tests in a chroot
> without debugfs. Tested on an AMD EPYC 9655P with KernelCI's x86_64
> build of next-20261104: without debugfs the test now skips, and with
> debugfs mounted it still passes all 62 cases.
>
> tools/testing/selftests/mm/split_huge_page_test.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Thanks. But I do think we need a way of specifying the necessary
Kconfig options for selftests. Oh, we do have one:
https://elixir.bootlin.com/linux/v7.3.1/source/tools/testing/selftests/mm/config. Can you add CONFIG_DEBUG_FS=y to it while at it?
Otherwise, LGTM.
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
Best Regards,
Yan, Zi