From: sashiko-bot@kernel.org
To: "Andi Kleen" <ak@linux.intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3 4/4] perf tools: Add test for weight annotation
Date: Fri, 14 Aug 2026 01:50:44 +0000 [thread overview]
Message-ID: <20260814015045.04D5C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260813214143.253418-5-ak@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Brittle and silent test assertion due to unisolated `PERF_CONFIG` environment.
--
--- Patch [4]: [PATCH v3 4/4] perf tools: Add test for weight annotation ---
commit ae0853531b9364f64586279c41d3ca0652fe3e71
Author: Andi Kleen <ak@linux.intel.com>
perf tools: Add test for weight annotation
This commit adds a new shell test case to verify that --stdio weight
annotation works correctly. It uses perf record to capture a precise PEBS
event and then tests the perf report and perf annotate tools.
> diff --git a/tools/perf/tests/shell/annotate_weight.sh b/tools/perf/tests/shell/annotate_weight.sh
> new file mode 100755
> --- /dev/null
> +++ b/tools/perf/tests/shell/annotate_weight.sh
[ ... ]
> +perf annotate --stdio -i "${perfdata}" --symbol "${testsym}" \
> + > "${annotate_out}" 2> "${record_log}"
> +
> +grep -q 'Percent Weight' "${annotate_out}"
[Severity: Medium]
Will this test fail silently for users with a customized ~/.perfconfig?
Because set -e is active at the top of the script, if a user has settings
like annotate.show_nr_samples=true or annotate.show_total_period=true,
perf annotate might change the column header from "Percent Weight" to
something like "Samples Weight" or "Period Weight".
This would cause this standalone grep command to fail and immediately
terminate the test without providing any diagnostics. Does this test need to
run in an isolated environment or parse the output more flexibly?
> +
> +# The second numeric column is the rendered average weight. This assertion
> +# fails on the original regression because calc_percent() left it at zero.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260813214143.253418-1-ak@linux.intel.com?part=4
prev parent reply other threads:[~2026-08-14 1:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 21:40 Another perf annotate weight patchkit Andi Kleen
2026-08-13 21:40 ` [PATCH v3 1/4] perf tools record: Modernize -W man page Andi Kleen
2026-08-14 1:22 ` sashiko-bot
2026-08-13 21:40 ` [PATCH v3 2/4] perf tools top: Add --weight option Andi Kleen
2026-08-14 1:29 ` sashiko-bot
2026-08-13 21:40 ` [PATCH v3 3/4] perf tools: Add support for displaying weights in annotate Andi Kleen
2026-08-14 1:43 ` sashiko-bot
2026-08-13 21:40 ` [PATCH v3 4/4] perf tools: Add test for weight annotation Andi Kleen
2026-08-14 1:50 ` sashiko-bot [this message]
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=20260814015045.04D5C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ak@linux.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 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.