From: sashiko-bot@kernel.org
To: "Li Pengfei" <ljdlns1987@gmail.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v7 08/10] selftests/ftrace: add a stackmap basic functionality test
Date: Sat, 12 Sep 2026 09:02:13 +0000 [thread overview]
Message-ID: <20260912090213.C77861F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260912083753.3426176-9-lipengfei28@xiaomi.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message claims a check is performed to verify that post-reset successes are below pre-reset successes, but this check is explicitly omitted in the script because it is flaky.
--
commit 874f10b935c1daaa7ebb380b794d32d569fa81af
Author: Pengfei Li <lipengfei28@xiaomi.com>
selftests/ftrace: add a stackmap basic functionality test
This commit adds a basic selftest for ftrace stackmap deduplication. It
exercises stackmap through sched_switch event stack capture, resets the
map while tracing, and validates counter logic and record reuse.
> Reset the map five times while tracing and the filtered writer remain
> active. Before each reset, require at least eight successes. Immediately
> after reset, send SIGSTOP and wait until /proc reports the worker in a
> stopped state before disabling tracing and sampling counters. Require the
> post-reset success count to be below the pre-reset count, proving that the
> sample belongs to a new generation. Reset again while the writer is
> stopped and require exactly zero entries before resuming and refilling.
[Severity: Medium]
Does the commit message need to be updated to match the code?
The commit message claims a check is performed to verify the post-reset
success count is below the pre-reset count. However, the test code itself
explicitly documents that no such counter is compared, because it would
make the test flaky:
> diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/stackmap-basic.tc b/tools/testing/selftests/ftrace/test.d/ftrace/stackmap-basic.tc
> --- /dev/null
> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/stackmap-basic.tc
[ ... ]
> +# Reset repeatedly while the owned writer is active, then again once it is
> +# quiesced. Only deterministic properties are asserted:
> +#
> +# - While the writer runs, the reset must be accepted. No counter is
> +# compared here: the writer resumes claiming records as soon as reset()
> +# returns, so any snapshot taken afterwards is a moving target and would
> +# make this test flaky rather than prove anything.
Should the commit message be revised to reflect the actual test logic that
intentionally skips this comparison?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260912083753.3426176-1-lipengfei28@xiaomi.com?part=8
next prev parent reply other threads:[~2026-09-12 9:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 8:37 [RFC PATCH v7 00/10] trace: stack trace deduplication for ftrace ring buffer Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 01/10] trace: add lock-free stackmap for stack trace deduplication Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 02/10] trace: use the stackmap from the ftrace stack recording path Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 03/10] trace: add stackmap statistics interface Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 04/10] trace: add stackmap binary export Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 05/10] trace: make the stackmap capacity settable on the kernel command line Li Pengfei
2026-09-12 8:58 ` sashiko-bot
2026-09-12 8:37 ` [RFC PATCH v7 06/10] Documentation: tracing: document the ftrace stackmap Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 07/10] tools/tracing: add a parser for the stackmap binary export Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 08/10] selftests/ftrace: add a stackmap basic functionality test Li Pengfei
2026-09-12 9:02 ` sashiko-bot [this message]
2026-09-12 8:37 ` [RFC PATCH v7 09/10] selftests/ftrace: add a stackmap reset and binary ABI test Li Pengfei
2026-09-12 8:37 ` [RFC PATCH v7 10/10] selftests/ftrace: add a stackmap instance gating test Li Pengfei
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=20260912090213.C77861F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=ljdlns1987@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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