All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ 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 related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-11-07 13:12 UTC | newest]

Thread overview: 14+ 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
2026-11-05 15:19 ` Zi Yan
2026-11-05 15:51   ` David Hildenbrand (Arm)
2026-11-05 17:18   ` [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment Sasha Levin
2026-11-05 17:21     ` Zi Yan
2026-11-05 17:53       ` David Hildenbrand (Arm)
2026-11-06 14:17     ` David Hildenbrand
2026-11-06 14:17     ` David Hildenbrand
2026-11-06 18:52       ` Sasha Levin
2026-11-06 21:32         ` David Hildenbrand (Arm)
2026-11-07 12:42           ` Sasha Levin
2026-11-07 13:12             ` David Hildenbrand (Arm)
2026-11-06  2:37 ` [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file Baolin Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.