From: SJ Park <sj@kernel.org>
To: sashiko-bot@kernel.org
Cc: SJ Park <sj@kernel.org>, damon@lists.linux.dev
Subject: Re: [RFC PATCH 7/9] selftests/damon/sysfs_memcg_path_leak: fail only for real DAMON leak
Date: Sat, 12 Sep 2026 13:20:08 -0700 [thread overview]
Message-ID: <20260912202009.146576-1-sj@kernel.org> (raw)
In-Reply-To: <20260912201518.700171F000FF@smtp.kernel.org>
On Sat, 12 Sep 2026 20:15:18 +0000 sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Medium] Use of the non-standard `--quiet` flag in `grep` can cause the test to silently mask real memory leaks on systems with strict POSIX grep implementations.
> - [Low] Typo in the warning message: 'apparenty' instead of 'apparently'.
> --
>
> commit afc83fe4758b4c2e76cc3da97cb99e2a990b6b83
> Author: SJ Park <sj@kernel.org>
>
> selftests/damon/sysfs_memcg_path_leak: fail only for real DAMON leak
>
> The selftest can fail for any leak if it happens while the test is running.
> Remove the false positive test failures by further checking if the expected
> leaking function is called out on the report.
>
> > diff --git a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
> > index 33a7ff43ed6cc..6c2d8bb3fe570 100755
> > --- a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
> > +++ b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh
> > @@ -41,5 +41,12 @@ if [ "$kmemleak_report" = "" ]
> > then
> > exit 0
> > fi
> > +if ! echo "$kmemleak_report" | grep "memcg_path_store" --quiet
>
> [Severity: Medium]
> Could the --quiet flag cause the test to accidentally mask real memory leaks?
>
> If the test runs in an environment with a strict POSIX grep implementation
> that does not support the GNU extension --quiet, grep will fail with an
> unrecognized option error.
>
> Because of the negated condition, a non-zero exit code from grep causes the
> script to evaluate to true, print a warning, and exit 0. Should the standard
> POSIX -q flag be used instead to ensure compatibility?
I believe kselftest runs on systems modern enough to have --quiet option. Let
me know if I'm wrong.
>
> > +then
> > + echo "[WARN] memleak found; apparenty not from DAMON, though"
>
> [Severity: Low]
> This isn't a bug, but there is a typo in the warning message (apparenty
> instead of apparently).
Good eyes, I will fix in the next spin.
>
> > + echo "$kmemleak_report"
> > + exit 0
> > +fi
> > +
> > echo "$kmemleak_report"
> > exit 1
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260912200814.145612-1-sj@kernel.org?part=7
Thanks,
SJ
next prev parent reply other threads:[~2026-09-12 20:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 20:08 [RFC PATCH 0/9] mm/damon: cleanup, clarify, and add/improve test SJ Park
2026-09-12 20:08 ` [RFC PATCH 1/9] mm/damon/api: remove NR_DAMOS_FILTER_TYPES SJ Park
2026-09-12 20:10 ` sashiko-bot
2026-09-12 20:08 ` [RFC PATCH 2/9] mm/damon/core: use abs_diff() in damon_feed_loop_next_input() SJ Park
2026-09-12 20:14 ` sashiko-bot
2026-09-12 20:08 ` [RFC PATCH 3/9] mm/damon/core: use mult_frac() " SJ Park
2026-09-12 20:12 ` sashiko-bot
2026-09-12 20:08 ` [RFC PATCH 4/9] mm/damon/core: use damos_quota_is_set() in damos_adjust_quota() SJ Park
2026-09-12 20:14 ` sashiko-bot
2026-09-12 20:08 ` [RFC PATCH 5/9] mm/damon/core: document damon_call()/damon_start() race hang issue SJ Park
2026-09-12 20:19 ` sashiko-bot
2026-09-12 20:08 ` [RFC PATCH 6/9] mm/damon/paddr: remove pa parameter from damon_pa_filter_pass() SJ Park
2026-09-12 20:13 ` sashiko-bot
2026-09-12 20:08 ` [RFC PATCH 7/9] selftests/damon/sysfs_memcg_path_leak: fail only for real DAMON leak SJ Park
2026-09-12 20:15 ` sashiko-bot
2026-09-12 20:20 ` SJ Park [this message]
2026-09-12 20:08 ` [RFC PATCH 8/9] mm/damon/tests/core-kunit: test eligible_mem_bp commitment SJ Park
2026-09-12 20:10 ` sashiko-bot
2026-09-12 20:08 ` [RFC PATCH 9/9] Docs/mm/damon/design: clarify bp is basis point SJ Park
2026-09-12 20:10 ` sashiko-bot
2026-09-12 20:26 ` Randy Dunlap
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=20260912202009.146576-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=sashiko-bot@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox