* [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; 12+ 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] 12+ 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 2026-11-05 15:19 ` Zi Yan 2026-11-06 2:37 ` [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file Baolin Wang 2 siblings, 0 replies; 12+ 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] 12+ 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 @ 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-06 2:37 ` [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file Baolin Wang 2 siblings, 2 replies; 12+ messages in thread From: Zi Yan @ 2026-11-05 15:19 UTC (permalink / raw) To: Sasha Levin Cc: Andrew Morton, David Hildenbrand, 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 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@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(+) > 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@nvidia.com> Best Regards, Yan, Zi ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file 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 1 sibling, 0 replies; 12+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-05 15:51 UTC (permalink / raw) To: Zi Yan, Sasha Levin Cc: Andrew Morton, 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 On 11/5/26 16:19, Zi Yan wrote: > 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@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(+) >> > > 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? Just what I was thinking. -- Cheers, David ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment 2026-11-05 15:19 ` Zi Yan 2026-11-05 15:51 ` David Hildenbrand (Arm) @ 2026-11-05 17:18 ` Sasha Levin 2026-11-05 17:21 ` Zi Yan ` (2 more replies) 1 sibling, 3 replies; 12+ messages in thread From: Sasha Levin @ 2026-11-05 17:18 UTC (permalink / raw) To: Andrew Morton Cc: Zi Yan, David Hildenbrand, Baolin Wang, Lorenzo Stoakes, Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Shuah Khan, linux-mm, linux-kselftest, linux-kernel The split_huge_page and gup tests need debugfs, and CONFIG_GUP_TEST depends on it. Add CONFIG_DEBUG_FS=y to the fragment. Suggested-by: Zi Yan <ziy@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- Merged into an x86_64 tinyconfig, the fragment leaves CONFIG_DEBUG_FS and CONFIG_GUP_TEST unset without this change and sets both with it. x86_64_defconfig already has CONFIG_DEBUG_FS=y and is unaffected. tools/testing/selftests/mm/config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/mm/config b/tools/testing/selftests/mm/config index 06f78bd232e2e..ff85b358d04cc 100644 --- a/tools/testing/selftests/mm/config +++ b/tools/testing/selftests/mm/config @@ -4,6 +4,7 @@ CONFIG_PTE_MARKER_UFFD_WP=y CONFIG_TEST_VMALLOC=m CONFIG_DEVICE_PRIVATE=y CONFIG_TEST_HMM=m +CONFIG_DEBUG_FS=y CONFIG_GUP_TEST=y CONFIG_TRANSPARENT_HUGEPAGE=y CONFIG_MEM_SOFT_DIRTY=y base-commit: dba8aba0a9a00ff781c03d82ae534fc6f8c2e263 -- 2.53.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment 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 2 siblings, 1 reply; 12+ messages in thread From: Zi Yan @ 2026-11-05 17:21 UTC (permalink / raw) To: Sasha Levin Cc: Andrew Morton, David Hildenbrand, Baolin Wang, Lorenzo Stoakes, Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Shuah Khan, linux-mm, linux-kselftest, linux-kernel On 5 Nov 2026, at 12:18, Sasha Levin wrote: > The split_huge_page and gup tests need debugfs, and CONFIG_GUP_TEST > depends on it. Add CONFIG_DEBUG_FS=y to the fragment. > > Suggested-by: Zi Yan <ziy@nvidia.com> > Signed-off-by: Sasha Levin <sashal@kernel.org> > --- > Merged into an x86_64 tinyconfig, the fragment leaves CONFIG_DEBUG_FS > and CONFIG_GUP_TEST unset without this change and sets both with it. > x86_64_defconfig already has CONFIG_DEBUG_FS=y and is unaffected. > Thanks. Reviewed-by: Zi Yan <ziy@nvidia.com> Best Regards, Yan, Zi ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment 2026-11-05 17:21 ` Zi Yan @ 2026-11-05 17:53 ` David Hildenbrand (Arm) 0 siblings, 0 replies; 12+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-05 17:53 UTC (permalink / raw) To: Zi Yan, Sasha Levin Cc: Andrew Morton, Baolin Wang, Lorenzo Stoakes, Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Shuah Khan, linux-mm, linux-kselftest, linux-kernel On 11/5/26 18:21, Zi Yan wrote: > On 5 Nov 2026, at 12:18, Sasha Levin wrote: > >> The split_huge_page and gup tests need debugfs, and CONFIG_GUP_TEST >> depends on it. Add CONFIG_DEBUG_FS=y to the fragment. >> >> Suggested-by: Zi Yan <ziy@nvidia.com> >> Signed-off-by: Sasha Levin <sashal@kernel.org> >> --- >> Merged into an x86_64 tinyconfig, the fragment leaves CONFIG_DEBUG_FS >> and CONFIG_GUP_TEST unset without this change and sets both with it. >> x86_64_defconfig already has CONFIG_DEBUG_FS=y and is unaffected. >> > > Thanks. > > Reviewed-by: Zi Yan <ziy@nvidia.com> Thanks, I'll wait a bit and then queue both. -- Cheers, David ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment 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-06 14:17 ` David Hildenbrand 2026-11-06 14:17 ` David Hildenbrand 2 siblings, 0 replies; 12+ messages in thread From: David Hildenbrand @ 2026-11-06 14:17 UTC (permalink / raw) To: Andrew Morton, Sasha Levin Cc: Zi Yan, David Hildenbrand, Baolin Wang, Lorenzo Stoakes, Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Shuah Khan, linux-mm, linux-kselftest, linux-kernel On Thu, 05 Nov 2026 12:18:01 -0500, Sasha Levin wrote: > The split_huge_page and gup tests need debugfs, and CONFIG_GUP_TEST > depends on it. Add CONFIG_DEBUG_FS=y to the fragment. Applied, thanks! tree: mm/core.git branch: thp-7.5.misc Applied patches will appear soon in mm-next, followed by linux-next. Please report any outstanding bugs that were missed during review, so we can either drop the patch series or decide how to fix it up. It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even though the patches have already been applied. If possible, patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. Further, this is not a guarantee that the patches will go upstream. If in doubt, please check the listed branch. [1/1] selftests/mm: add CONFIG_DEBUG_FS to the config fragment https://git.kernel.org/mm/core/c/31ea5515 -- Cheers, David ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment 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-06 14:17 ` David Hildenbrand @ 2026-11-06 14:17 ` David Hildenbrand 2026-11-06 18:52 ` Sasha Levin 2 siblings, 1 reply; 12+ messages in thread From: David Hildenbrand @ 2026-11-06 14:17 UTC (permalink / raw) To: Andrew Morton, Sasha Levin Cc: Zi Yan, David Hildenbrand, Baolin Wang, Lorenzo Stoakes, Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Shuah Khan, linux-mm, linux-kselftest, linux-kernel On Thu, 05 Nov 2026 12:18:01 -0500, Sasha Levin wrote: > The split_huge_page and gup tests need debugfs, and CONFIG_GUP_TEST > depends on it. Add CONFIG_DEBUG_FS=y to the fragment. Applied, thanks! tree: mm/core.git branch: core-7.5.misc Applied patches will appear soon in mm-next, followed by linux-next. Please report any outstanding bugs that were missed during review, so we can either drop the patch series or decide how to fix it up. It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even though the patches have already been applied. If possible, patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. Further, this is not a guarantee that the patches will go upstream. If in doubt, please check the listed branch. [1/1] selftests/mm: add CONFIG_DEBUG_FS to the config fragment https://git.kernel.org/mm/core/c/194b6319 -- Cheers, David ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment 2026-11-06 14:17 ` David Hildenbrand @ 2026-11-06 18:52 ` Sasha Levin 2026-11-06 21:32 ` David Hildenbrand (Arm) 0 siblings, 1 reply; 12+ messages in thread From: Sasha Levin @ 2026-11-06 18:52 UTC (permalink / raw) To: David Hildenbrand Cc: Andrew Morton, Zi Yan, Baolin Wang, linux-mm, linux-kselftest, linux-kernel On Fri, 06 Nov 2026 15:17:55 +0100, David Hildenbrand wrote: >[1/1] selftests/mm: add CONFIG_DEBUG_FS to the config fragment > https://git.kernel.org/mm/core/c/31ea5515 Thanks! It looks like this one landed on both thp-7.5.misc and core-7.5.misc: 31ea5515bf59 ("selftests/mm: add CONFIG_DEBUG_FS to the config fragment") 194b63198811 ("selftests/mm: add CONFIG_DEBUG_FS to the config fragment") Was the thp-7.5.misc one meant to be the split_huge_page_test skip patch? https://lore.kernel.org/all/20261105030242.1241448-1-sashal@kernel.org/ -- Thanks, Sasha ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment 2026-11-06 18:52 ` Sasha Levin @ 2026-11-06 21:32 ` David Hildenbrand (Arm) 0 siblings, 0 replies; 12+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-06 21:32 UTC (permalink / raw) To: Sasha Levin Cc: Andrew Morton, Zi Yan, Baolin Wang, linux-mm, linux-kselftest, linux-kernel On 11/6/26 19:52, Sasha Levin wrote: > On Fri, 06 Nov 2026 15:17:55 +0100, David Hildenbrand wrote: >> [1/1] selftests/mm: add CONFIG_DEBUG_FS to the config fragment >> https://git.kernel.org/mm/core/c/31ea5515 > > Thanks! It looks like this one landed on both thp-7.5.misc and > core-7.5.misc: > > 31ea5515bf59 ("selftests/mm: add CONFIG_DEBUG_FS to the config fragment") > 194b63198811 ("selftests/mm: add CONFIG_DEBUG_FS to the config fragment") > > Was the thp-7.5.misc one meant to be the split_huge_page_test skip patch? > > https://lore.kernel.org/all/20261105030242.1241448-1-sashal@kernel.org/ Fixes. b4 shazam gets confused when patches are sent in reply to patches. Which is why we shouldn't do it ;) -- Cheers, David ^ permalink raw reply [flat|nested] 12+ 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 2026-11-05 15:19 ` Zi Yan @ 2026-11-06 2:37 ` Baolin Wang 2 siblings, 0 replies; 12+ messages in thread From: Baolin Wang @ 2026-11-06 2:37 UTC (permalink / raw) To: Sasha Levin, Andrew Morton Cc: David Hildenbrand, Zi Yan, 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 On 11/5/26 11:02 AM, 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> > --- Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-11-06 21:35 UTC | newest] Thread overview: 12+ 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-06 2:37 ` [PATCH] selftests/mm: skip split_huge_page_test without the split_huge_pages file Baolin Wang
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®