From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: Jiebin Sun <jiebin.sun@intel.com>, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 4/4] perf tests c2c: Add function view stdio coverage
Date: Tue, 8 Sep 2026 18:22:00 -0300 [thread overview]
Message-ID: <aqB8eNXwAvKoiMMR@x2> (raw)
In-Reply-To: <20260821055803.74B191F00A3A@smtp.kernel.org>
On Fri, Aug 21, 2026 at 05:58:03AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The newly added `test_c2c_function_report` test fails spuriously because it incorrectly assumes `perfdata` is valid when `err` is 0. If the workload in `test_c2c_record_report` fails, it returns early but leaves `err=0`. This causes `test_c2c_function_report` to process an invalid or missing `perfdata` file, failing its diagnostic checks and setting `err=1` (test failure).
> --
Can you please take a look at this one? Namhyung Acked the series and
the other patches are clean so after this gets addressed I'll merge it.
Thanks,
- Arnaldo
> --- Patch [4]: [PATCH 4/4] perf tests c2c: Add function view stdio coverage ---
> commit 32c977aa30c2c6186f39077056298ef3b53307dd
> Author: Jiebin Sun <jiebin.sun@intel.com>
>
> perf tests c2c: Add function view stdio coverage
>
> Exercise the function view without driving a terminal now that it has
> a stdio path. Keep the existing datasym record/report coverage and make a
> separate recording of the contended locks used by the futex hash benchmark.
>
> > diff --git a/tools/perf/tests/shell/c2c.sh b/tools/perf/tests/shell/c2c.sh
> > index f5f223cbf9cc7..cf76359d19ccd 100755
> > --- a/tools/perf/tests/shell/c2c.sh
> > +++ b/tools/perf/tests/shell/c2c.sh
> [ ... ]
> > @@ -58,6 +63,114 @@ test_c2c_record_report() {
> > echo "c2c record and report test [Success]"
> > }
> >
> > +test_c2c_function_report() {
> > + echo "c2c function stdio report test"
> > +
> > + if perf c2c report -i "${perfdata}" --function -c pid > "${perfout}" 2>&1 ; then
> > + echo "c2c function stdio report test [Failed: report accepted missing iaddr]"
> > + err=1
> > + return
> > + fi
> [ ... ]
> > test_c2c_record_report
> > +if [ "${err}" -eq 0 ]; then
> > + test_c2c_function_report
> > +fi
> > cleanup
> > exit $err
>
> [Severity: Medium]
> Will this lead to a spurious test failure if the record workload fails?
>
> In test_c2c_record_report(), if the 'perf test -w datasym 1' workload fails,
> it returns early without modifying err, leaving err=0:
>
> if ! perf c2c record -o "${perfdata}" -- perf test -w datasym 1 > /dev/null 2>&1 ; then
> echo "c2c record and report test [Skipped: perf c2c record failed during workload]"
> return
> fi
>
> Because err remains 0, test_c2c_function_report() will conditionally execute
> and attempt to use the missing or invalid perfdata file. This will cause
> test_c2c_function_report() to fail its diagnostic checks and set err=1.
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/cover.1787283281.git.jiebin.sun@intel.com?part=4
next prev parent reply other threads:[~2026-09-08 21:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 5:56 [PATCH 0/4] perf c2c: Add function-view stdio support and coverage Jiebin Sun
2026-08-21 5:56 ` [PATCH 1/4] perf c2c: Fix documented default coalesce fields Jiebin Sun
2026-08-21 5:57 ` sashiko-bot
2026-08-21 5:56 ` [PATCH 2/4] perf tests c2c: Report skip when the workload fails Jiebin Sun
2026-08-21 5:52 ` sashiko-bot
2026-08-21 5:56 ` [PATCH 3/4] perf c2c: Add stdio support for the function view Jiebin Sun
2026-08-21 5:58 ` sashiko-bot
2026-08-21 5:56 ` [PATCH 4/4] perf tests c2c: Add function view stdio coverage Jiebin Sun
2026-08-21 5:58 ` sashiko-bot
2026-09-08 21:22 ` Arnaldo Carvalho de Melo [this message]
2026-09-09 3:01 ` Jiebin Sun
2026-09-25 13:27 ` Arnaldo Carvalho de Melo
2026-08-29 20:05 ` [PATCH 0/4] perf c2c: Add function-view stdio support and coverage Namhyung Kim
2026-08-29 22:51 ` Arnaldo Melo
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=aqB8eNXwAvKoiMMR@x2 \
--to=acme@kernel.org \
--cc=jiebin.sun@intel.com \
--cc=linux-perf-users@vger.kernel.org \
--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