* [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
2026-11-05 15:19 ` Zi Yan
0 siblings, 2 replies; 7+ 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] 7+ 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
1 sibling, 0 replies; 7+ 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] 7+ 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
1 sibling, 2 replies; 7+ 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] 7+ 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; 7+ 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] 7+ 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
1 sibling, 1 reply; 7+ 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 related [flat|nested] 7+ 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)
0 siblings, 1 reply; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread
end of thread, other threads:[~2026-11-05 17:54 UTC | newest]
Thread overview: 7+ 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)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox