* [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file
@ 2026-11-05 3:02 Sasha Levin
2026-11-05 11:49 ` Kiryl Shutsemau
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-11-05 3:02 UTC (permalink / raw)
To: Andrew Morton
Cc: David Hildenbrand, Zi Yan, Baolin Wang, Lorenzo Stoakes,
Liam R . Howlett, Nico Pache, Ryan Roberts, Dev Jain, Barry Song,
Lance Yang, Usama Arif, Kiryl Shutsemau, Shuah Khan, linux-mm,
linux-kselftest, linux-kernel
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@kernel.org>
---
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(+)
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c
index 33a2473327bb7..deabb7db06192 100644
--- a/tools/testing/selftests/mm/split_huge_page_test.c
+++ b/tools/testing/selftests/mm/split_huge_page_test.c
@@ -610,6 +610,9 @@ int main(int argc, char **argv)
if (!thp_is_enabled())
ksft_exit_skip("Transparent Hugepages not available\n");
+ if (access(SPLIT_DEBUGFS, W_OK))
+ ksft_exit_skip("%s: %s\n", SPLIT_DEBUGFS, strerror(errno));
+
if (argc > 1)
optional_xfs_path = argv[1];
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file
2026-11-05 3:02 [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file Sasha Levin
@ 2026-11-05 11:49 ` Kiryl Shutsemau
0 siblings, 0 replies; 2+ messages in thread
From: Kiryl Shutsemau @ 2026-11-05 11:49 UTC (permalink / raw)
To: Sasha Levin
Cc: Andrew Morton, David Hildenbrand, Zi Yan, Baolin Wang,
Lorenzo Stoakes, Liam R . Howlett, Nico Pache, Ryan Roberts,
Dev Jain, Barry Song, Lance Yang, Usama Arif, Shuah Khan,
linux-mm, linux-kselftest, linux-kernel
On Wed, Nov 04, 2026 at 10:02:42PM -0500, 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@kernel.org>
Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
--
Kiryl Shutsemau / Kirill A. Shutemov
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-05 11:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 3:02 [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file Sasha Levin
2026-11-05 11:49 ` Kiryl Shutsemau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®