selftests/mm: skip split_huge_page_test without the split_huge_pages file
Subsystems (4)
PATCH 1/1 selftests/mm: skip split_huge_page_test without the split_huge_pages file
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.
---
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(+)
tools/testing/selftests/mm/split_huge_page_test.c +3 -0
@@ -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 ];
Signature · 1 line
2.53.0
Quoted 11 lines · Sasha Levin
Every case in
split_huge_page_testgoes through/sys/kernel/debug/split_huge_pages. When that file does not exist, because debugfs is not mounted or the kernel has noCONFIG_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 directorySkip the test in that case.
Fixes fa6c02315f74 ("mm: huge_memory: a new debugfs interface for splitting THP tests")Signed-off-by Sasha Levin <[email protected]>
Signature · 1 line
Kiryl Shutsemau / Kirill A. Shutemov
Quoted 11 lines · Sasha Levin
Every case in
split_huge_page_testgoes through/sys/kernel/debug/split_huge_pages. When that file does not exist, because debugfs is not mounted or the kernel has noCONFIG_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 directorySkip the test in that case.
Fixes fa6c02315f74 ("mm: huge_memory: a new debugfs interface for splitting THP tests")Signed-off-by Sasha Levin <[email protected]>
Quoted 9 lines
---
Found with KernelCI's NVIDIA lab, which runs the tests in a chroot without debugfs. Tested on an AMD EPYC 9655P with KernelCI'sx86_64build 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 necessaryKconfig 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.
Best Regards,
Yan, Zi
David Hildenbrand (Arm)
maintainerQuoted 19 lines · Zi Yan
Quoted 17 lines · Sasha Levin
Every case in
split_huge_page_testgoes through/sys/kernel/debug/split_huge_pages. When that file does not exist, because debugfs is not mounted or the kernel has noCONFIG_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 directorySkip the test in that case.
Fixes fa6c02315f74 ("mm: huge_memory: a new debugfs interface for splitting THP tests")Signed-off-by Sasha Levin <[email protected]>---
Found with KernelCI's NVIDIA lab, which runs the tests in a chroot without debugfs. Tested on an AMD EPYC 9655P with KernelCI'sx86_64build of next-20261104: without debugfs the test now skips, and with debugfs mounted it still passes all 62 cases.
Quoted 7 lines
Quoted 3 lines
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
Kconfigoptions for selftests. Oh, we do have one:
https://elixir.bootlin.com/linux/v7.3.1/source/tools/testing/selftests/mm/config. Can you addCONFIG_DEBUG_FS=yto it while at it?
Just what I was thinking.
Signature · 3 lines
Cheers, David
PATCH 1/1 selftests/mm: add CONFIG_DEBUG_FS to the config fragment
In reply to Zi YanThe split_huge_page and gup tests need debugfs, and CONFIG_GUP_TEST depends on it. Add CONFIG_DEBUG_FS=y to the fragment.
---
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(+)
tools/testing/selftests/mm/config +1 -0
@@ -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
Signature · 1 line
2.53.0
Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
Quoted 10 lines · Sasha Levin
The
split_huge_pageand gup tests need debugfs, andCONFIG_GUP_TESTdepends on it. AddCONFIG_DEBUG_FS=yto the fragment.Suggested-by Zi Yan <[email protected]>Signed-off-by Sasha Levin <[email protected]>---
Merged into anx86_64tinyconfig, the fragment leavesCONFIG_DEBUG_FSandCONFIG_GUP_TESTunset without this change and sets both with it.x86_64_defconfigalready hasCONFIG_DEBUG_FS=yand is unaffected.
Thanks.
Best Regards,
Yan, Zi
David Hildenbrand (Arm)
maintainerRe: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
Quoted 13 lines · Zi Yan
Quoted 10 lines · Sasha Levin
The
split_huge_pageand gup tests need debugfs, andCONFIG_GUP_TESTdepends on it. AddCONFIG_DEBUG_FS=yto the fragment.Suggested-by Zi Yan <[email protected]>Signed-off-by Sasha Levin <[email protected]>---
Merged into anx86_64tinyconfig, the fragment leavesCONFIG_DEBUG_FSandCONFIG_GUP_TESTunset without this change and sets both with it.x86_64_defconfigalready hasCONFIG_DEBUG_FS=yand is unaffected.
Quoted 3 lines
Thanks.
Reviewed-by Zi Yan <[email protected]>
Thanks, I'll wait a bit and then queue both.
Signature · 3 lines
Cheers, David
Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
In reply to Sasha LevinQuoted 2 lines · Sasha Levin
The
split_huge_pageand gup tests need debugfs, andCONFIG_GUP_TESTdepends on it. AddCONFIG_DEBUG_FS=yto 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
Signature · 3 lines
Cheers, David
Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
In reply to Sasha LevinQuoted 2 lines · Sasha Levin
The
split_huge_pageand gup tests need debugfs, andCONFIG_GUP_TESTdepends on it. AddCONFIG_DEBUG_FS=yto 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
Signature · 3 lines
Cheers, David
Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
Quoted 2 lines · David Hildenbrand
[1/1] selftests/mm: add
CONFIG_DEBUG_FSto the config fragmenthttps://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/[email protected]/
--
Thanks,
Sasha
David Hildenbrand (Arm)
maintainerRe: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
Quoted 7 lines · Sasha Levin
Quoted 2 lines · David Hildenbrand
[1/1] selftests/mm: add
CONFIG_DEBUG_FSto the config fragmenthttps://git.kernel.org/mm/core/c/31ea5515Thanks! It looks like this one landed on both thp-7.5.misc and core-7.5.misc:
Quoted 6 lines
31ea5515bf59("selftests/mm: addCONFIG_DEBUG_FSto the config fragment")194b63198811("selftests/mm: addCONFIG_DEBUG_FSto the config fragment")Was the thp-7.5.misc one meant to be the
split_huge_page_testskip patch?
Fixes.
b4 shazam gets confused when patches are sent in reply to patches.
Which is why we shouldn't do it ;)
Signature · 3 lines
Cheers, David
Re: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
Quoted 13 lines · David Hildenbrand (Arm)
Quoted 12 lines · Sasha Levin
Quoted 2 lines · David Hildenbrand
[1/1] selftests/mm: add
CONFIG_DEBUG_FSto the config fragmenthttps://git.kernel.org/mm/core/c/31ea5515Thanks! It looks like this one landed on both thp-7.5.misc and core-7.5.misc:
31ea5515bf59("selftests/mm: addCONFIG_DEBUG_FSto the config fragment")194b63198811("selftests/mm: addCONFIG_DEBUG_FSto the config fragment")Was the thp-7.5.misc one meant to be the
split_huge_page_testskip patch?
Quoted 7 lines
Quoted 1 line
Fixes.
b4 shazam gets confused when patches are sent in reply to patches.
Which is why we shouldn't do it ;)
Remember my gripe about how subsystems are starting to have more and more custom rules around process? :p
Our docs currently say (Documentation/process/submitting-patches.rst):
Explicit In-Reply-To headers
----------------------------
It can be helpful to manually add In-Reply-To: headers to a patch (e.g., when using ``git send-email``) to associate the patch with previous relevant discussion, e.g. to link a bug fix to the email with the bug report.
I suppose it's okay for parts of the kernel to deviate from the "standard", but it's a bit hard to keep track of these preferences.
Signature · 2 lines
Thanks, Sasha
David Hildenbrand (Arm)
maintainerRe: [PATCH] selftests/mm: add CONFIG_DEBUG_FS to the config fragment
Quoted 13 lines · Sasha Levin
Quoted 12 lines · David Hildenbrand (Arm)
Quoted 10 lines · Sasha Levin
Thanks! It looks like this one landed on both thp-7.5.misc and core-7.5.misc:
31ea5515bf59("selftests/mm: addCONFIG_DEBUG_FSto the config fragment")194b63198811("selftests/mm: addCONFIG_DEBUG_FSto the config fragment")Was the thp-7.5.misc one meant to be the
split_huge_page_testskip patch?
Quoted 8 lines
Quoted 5 lines
Fixes.
b4 shazam gets confused when patches are sent in reply to patches.
Which is why we shouldn't do it ;)
Remember my gripe about how subsystems are starting to have more and more custom rules around process? :p
Let's not twist my words. I said "we shouldn't do it", there are no rules around it and also I don't want any rules around that.
And the example below (bug vs. bug report) makes perfect sense.
Quoted 6 lines
Our docs currently say (
Documentation/process/submitting-patches.rst):Explicit In-Reply-To headers
----------------------------
Quoted 7 lines
It can be helpful to manually add In-Reply-To: headers to a patch (e.g., when using ``git send-email``) to associate the patch with previous relevant discussion, e.g. to link a bug fix to the email with the bug report.
I suppose it's okay for parts of the kernel to deviate from the "standard", but it's a bit hard to keep track of these preferences.
Just to be clear, patch in reply to patch to me is something different than patch in reply to discussion.
People tend to ignore certain patches because it's not relevant for them; burying something related but more generic in there is not always the best idea.
But it all doesn't matter, because there are not any such strict rules and I just have to learn to properly use b4 :P
Signature · 3 lines
Cheers, David
Quoted 5 lines · Sasha Levin
Every case in
split_huge_page_testgoes through/sys/kernel/debug/split_huge_pages. When that file does not exist, because debugfs is not mounted or the kernel has noCONFIG_DEBUG_FS, the first write bails out of the whole test and it is reported as a failure:
Quoted 7 lines
Bail out!
write_file(/sys/kernel/debug/split_huge_pages): No such file or directorySkip the test in that case.
Fixes fa6c02315f74 ("mm: huge_memory: a new debugfs interface for splitting THP tests")Signed-off-by Sasha Levin <[email protected]>---