From: SJ Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SJ Park <sj@kernel.org>,
stable@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-mm@kvack.org,
Aveline Noir <jm5905938@gmail.com>
Subject: [PATCH mm-hotfixes-unstable 3/3] selftests/damon/sysfs_memcg_path_leak: define ksft_skip
Date: Mon, 2 Nov 2026 06:46:26 -0800 [thread overview]
Message-ID: <20261102144627.88843-4-sj@kernel.org> (raw)
In-Reply-To: <20261102144627.88843-1-sj@kernel.org>
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
Reviewed-by: Aveline Noir <jm5905938@gmail.com>
Tested-by: Aveline Noir <jm5905938@gmail.com>
Signed-off-by: SJ Park <sj@kernel.org>
---
Changes from RFC
- RFC: https://lore.kernel.org/20261030044643.157105-1-sj@kernel.org
- Drop RFC tag.
- Rebase to latest mm-new.
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"
--
2.47.3
next prev parent reply other threads:[~2026-11-02 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 14:46 [PATCH mm-hotfixes-unstable 0/3] mm/damon: fix watermark state, kunit pid leak and selftest fake pass SJ Park
2026-11-02 14:46 ` [PATCH mm-hotfixes-unstable 1/3] mm/damon/core: reset watermark wait state on each iteration SJ Park
2026-11-02 14:48 ` sashiko-bot
2026-11-02 14:46 ` [PATCH mm-hotfixes-unstable 2/3] mm/damon/tests/sysfs-kunit: fix leaked pid reference in add_targets test SJ Park
2026-11-02 14:50 ` sashiko-bot
2026-11-02 14:46 ` SJ Park [this message]
2026-11-02 14:48 ` [PATCH mm-hotfixes-unstable 3/3] selftests/damon/sysfs_memcg_path_leak: define ksft_skip sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102144627.88843-4-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=jm5905938@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.