* [PATCH] selftests/damon/sysfs_memcg_path_leak: use common check_dependencies()
@ 2026-11-29 2:00 Enze Li
2026-11-29 2:02 ` sashiko-bot
2026-11-29 2:27 ` SJ Park
0 siblings, 2 replies; 3+ messages in thread
From: Enze Li @ 2026-11-29 2:00 UTC (permalink / raw)
To: sj, shuah; +Cc: damon, linux-mm, linux-kselftest, Enze Li
From: Enze Li <lienze@kylinos.cn>
The sysfs_memcg_path_leak test is the only DAMON selftest shell script
that does not source _common.sh. Instead it open-codes the root
permission check that check_dependencies() already provides.
Source _common.sh and call check_dependencies() to drop the duplicate.
Signed-off-by: Enze Li <lienze@kylinos.cn>
---
tools/testing/selftests/damon/sysfs_memcg_path_leak.sh | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
index d407dddb879e..23e4940d7843 100755
--- a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
+++ b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
@@ -1,14 +1,12 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
+source _common.sh
+
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
-if [ $EUID -ne 0 ]
-then
- echo "Run as root"
- exit $ksft_skip
-fi
+check_dependencies
damon_sysfs="/sys/kernel/mm/damon/admin"
if [ ! -d "$damon_sysfs" ]
base-commit: 23cd682622886800b912219e307cf46a99f69c10
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/damon/sysfs_memcg_path_leak: use common check_dependencies()
2026-11-29 2:00 [PATCH] selftests/damon/sysfs_memcg_path_leak: use common check_dependencies() Enze Li
@ 2026-11-29 2:02 ` sashiko-bot
2026-11-29 2:27 ` SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-29 2:02 UTC (permalink / raw)
To: Enze Li; +Cc: damon
> From: Enze Li <lienze@kylinos.cn>
>
> The sysfs_memcg_path_leak test is the only DAMON selftest shell script
> that does not source _common.sh. Instead it open-codes the root
> permission check that check_dependencies() already provides.
>
> Source _common.sh and call check_dependencies() to drop the duplicate.
>
> Signed-off-by: Enze Li <lienze@kylinos.cn>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261129020003.45921-1-enze.li@linux.dev?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/damon/sysfs_memcg_path_leak: use common check_dependencies()
2026-11-29 2:00 [PATCH] selftests/damon/sysfs_memcg_path_leak: use common check_dependencies() Enze Li
2026-11-29 2:02 ` sashiko-bot
@ 2026-11-29 2:27 ` SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-11-29 2:27 UTC (permalink / raw)
To: Enze Li; +Cc: SJ Park, shuah, damon, linux-mm, linux-kselftest, Enze Li
On Sun, 29 Nov 2026 10:00:03 +0800 Enze Li <enze.li@linux.dev> wrote:
> From: Enze Li <lienze@kylinos.cn>
>
> The sysfs_memcg_path_leak test is the only DAMON selftest shell script
> that does not source _common.sh. Instead it open-codes the root
> permission check that check_dependencies() already provides.
>
> Source _common.sh and call check_dependencies() to drop the duplicate.
Looks good to me, thank you for cleaning this up!
>
> Signed-off-by: Enze Li <lienze@kylinos.cn>
Reviewed-by: SJ Park <sj@kernel.org>
This patch is applied to damon/next [1] tree. I will repost it soon (~1 week)
as an mm.git merge request. So, no action from your side is needed for now.
[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-29 2:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 2:00 [PATCH] selftests/damon/sysfs_memcg_path_leak: use common check_dependencies() Enze Li
2026-11-29 2:02 ` sashiko-bot
2026-11-29 2:27 ` SJ Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox