* [RFC PATCH] selftests/damon/sysfs_memcg_path_leak: define ksft_skip
@ 2026-10-30 4:46 SJ Park
2026-10-31 4:36 ` Aveline Noir
0 siblings, 1 reply; 5+ messages in thread
From: SJ Park @ 2026-10-30 4:46 UTC (permalink / raw)
Cc: SJ Park, stable, Andrew Morton, Shuah Khan, damon, linux-kernel,
linux-kselftest, linux-mm
sysfs_memcg_path_leak test uses $ksft_skip without defining it. As a
result, the test is marked as passed while it was skipped, like below.
$ ./sysfs_memcg_path_leak.sh
Run as root
$ echo $?
0
Users who run the test could therefore wrongly believe the test was run
and passed while it was skipped.
Define the value at the beginning of the test. After this patch, the
exit code reflects the skip.
$ ./sysfs_memcg_path_leak.sh
Run as root
$ echo $?
4
Fixes: dfa3cf0bc018 ("selftets/damon: add a test for memcg_path leak")
Cc: <stable@vger.kernel.org> # 6.17.x
Closes: https://sashiko.dev/#/bug/linux-a0456336-0608-4fec-ac22-0ee61d1d6a91
Signed-off-by: SJ Park <sj@kernel.org>
---
tools/testing/selftests/damon/sysfs_memcg_path_leak.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
index 34c37129c49fe..d407dddb879ec 100755
--- a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
+++ b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
@@ -1,6 +1,9 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
if [ $EUID -ne 0 ]
then
echo "Run as root"
base-commit: 20b1ca206f8a664a16ad3006262c63b5d37b1ecc
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [RFC PATCH] selftests/damon/sysfs_memcg_path_leak: define ksft_skip
2026-10-30 4:46 [RFC PATCH] selftests/damon/sysfs_memcg_path_leak: define ksft_skip SJ Park
@ 2026-10-31 4:36 ` Aveline Noir
2026-10-31 15:38 ` SJ Park
0 siblings, 1 reply; 5+ messages in thread
From: Aveline Noir @ 2026-10-31 4:36 UTC (permalink / raw)
To: SJ Park
Cc: Andrew Morton, damon, linux-kernel, linux-kselftest, linux-mm,
sashiko-bot, sashiko-reviews, Shuah Khan, stable
Hi SJ,
On Thu, 29 Oct 2026 21:46:42 -0700 SJ Park wrote:
> Define the value at the beginning of the test.
Makes sense to me.
Thanks,
Aveline Noir
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] selftests/damon/sysfs_memcg_path_leak: define ksft_skip
2026-10-31 4:36 ` Aveline Noir
@ 2026-10-31 15:38 ` SJ Park
2026-10-31 16:34 ` Aveline Noir
0 siblings, 1 reply; 5+ messages in thread
From: SJ Park @ 2026-10-31 15:38 UTC (permalink / raw)
To: Aveline Noir
Cc: SJ Park, Andrew Morton, damon, linux-kernel, linux-kselftest,
linux-mm, sashiko-bot, sashiko-reviews, Shuah Khan, stable
On Sat, 31 Oct 2026 15:36:00 +1100 Aveline Noir <jm5905938@gmail.com> wrote:
> Hi SJ,
>
> On Thu, 29 Oct 2026 21:46:42 -0700 SJ Park wrote:
>
> > Define the value at the beginning of the test.
>
> Makes sense to me.
Thank you for reviewing, Aveline. No pressure, but have you forgot giving your
Reviewed-by: tag?
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] selftests/damon/sysfs_memcg_path_leak: define ksft_skip
2026-10-31 15:38 ` SJ Park
@ 2026-10-31 16:34 ` Aveline Noir
2026-10-31 17:47 ` SJ Park
0 siblings, 1 reply; 5+ messages in thread
From: Aveline Noir @ 2026-10-31 16:34 UTC (permalink / raw)
To: SJ Park
Cc: Andrew Morton, damon, linux-kernel, linux-kselftest, linux-mm,
sashiko-bot, sashiko-reviews, Shuah Khan, stable
Hi SJ,
On Sat, 31 Oct 2026 08:38:58 -0700 SJ Park wrote:
> Thank you for reviewing, Aveline.
Oh, looks like I forgot that. Thanks for the reminder.
That also gives me an idea: maybe I could build a modular tool to help
write emails. Building on b4 might be a good starting point.
Tested the non-root skip path on x86-64 Linux with Bash 5.3.20:
the exit status changed from 0 to 4.
Reviewed-by: Aveline Noir <jm5905938@gmail.com>
Tested-by: Aveline Noir <jm5905938@gmail.com>
Thanks,
Aveline Noir
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] selftests/damon/sysfs_memcg_path_leak: define ksft_skip
2026-10-31 16:34 ` Aveline Noir
@ 2026-10-31 17:47 ` SJ Park
0 siblings, 0 replies; 5+ messages in thread
From: SJ Park @ 2026-10-31 17:47 UTC (permalink / raw)
To: Aveline Noir
Cc: SJ Park, Andrew Morton, damon, linux-kernel, linux-kselftest,
linux-mm, sashiko-bot, sashiko-reviews, Shuah Khan, stable
On Sun, 01 Nov 2026 03:34:41 +1100 Aveline Noir <jm5905938@gmail.com> wrote:
> Hi SJ,
>
> On Sat, 31 Oct 2026 08:38:58 -0700 SJ Park wrote:
>
> > Thank you for reviewing, Aveline.
>
> Oh, looks like I forgot that. Thanks for the reminder.
No worries!
>
> That also gives me an idea: maybe I could build a modular tool to help
> write emails. Building on b4 might be a good starting point.
Sounds like a good plan!
>
> Tested the non-root skip path on x86-64 Linux with Bash 5.3.20:
> the exit status changed from 0 to 4.
>
> Reviewed-by: Aveline Noir <jm5905938@gmail.com>
> Tested-by: Aveline Noir <jm5905938@gmail.com>
Thank you for reviewing and testing!
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-31 17:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 4:46 [RFC PATCH] selftests/damon/sysfs_memcg_path_leak: define ksft_skip SJ Park
2026-10-31 4:36 ` Aveline Noir
2026-10-31 15:38 ` SJ Park
2026-10-31 16:34 ` Aveline Noir
2026-10-31 17:47 ` SJ Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox