From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 5/6] perf test attr: Fix default stat metrics expectations
Date: Tue, 06 Oct 2026 16:26:50 +0000 [thread overview]
Message-ID: <sashiko-outbox-162255@kernel.org> (raw)
In-Reply-To: <20261006161309.3078488-6-acme@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] perf/tests: x86-specific hardcoded configs break attr tests on non-x86
--
commit 6df29817a2edc466c96d59a9f6ec9a8a8616ca28
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
perf test attr: Fix default stat metrics expectations
This commit updates the perf stat default metrics test expectations to reflect
changes in event grouping and execution. It also hardcodes raw hardware event
encodings specifically seen on Intel and AMD architectures into the default
expectation files.
> diff --git a/tools/perf/tests/shell/attr/test-stat-default b/tools/perf/tests/shell/attr/test-stat-default
> index 8dd27c1fb661f..e79bc56389fda 100644
> --- a/tools/perf/tests/shell/attr/test-stat-default
> +++ b/tools/perf/tests/shell/attr/test-stat-default
[ ... ]
> @@ -233,4 +233,32 @@ optional=1
> fd=29
> type=4
> config=4269
> +optional=1
> +
> +# PERF_TYPE_RAW / instructions (core PMU sysfs event)
> +[event30:base-stat]
> +fd=30
> +type=4
> +config=192
> +optional=1
[Severity: Medium]
Does adding these strictly x86-specific event expectations cause the attr
tests to break on non-x86 architectures like ARM64?
Since commit b1c5efbfd92eb84d, standard events dynamically resolve to core PMU
sysfs/JSON events based on the host architecture (e.g., dynamic type 8,
config 0x8 on ARM64).
When the test is run on non-x86 architectures, the actual generated events
will use the local PMU type and config. Because these expectations do not
use platform-agnostic wildcards, they won't match the local PMU events.
The validation script in tools/perf/tests/shell/lib/attr.py tests
expectations bidirectionally. While optional=1 allows an expectation to be
missing from the actual events, the reverse direction strictly mandates that
every actual generated event matches an expectation:
tools/perf/tests/shell/lib/attr.py:compare()
...
raise Fail(self, 'match failure')
Because the actual non-x86 events lack a matching expectation, the compare()
function will unconditionally raise this match failure for the unrecognized
actual events, breaking the suite on non-x86 platforms. Is there a way to
handle architectural variations dynamically here?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006161309.3078488-1-acme@kernel.org?part=5
next prev parent reply other threads:[~2026-10-06 16:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 16:13 [PATCH 0/6 v1] perf test attr: Fix the re-enabled test Arnaldo Carvalho de Melo
2026-10-06 16:13 ` [PATCH 1/6] perf test attr: Propagate the return value from the test to the wrapper Arnaldo Carvalho de Melo
2026-10-06 16:18 ` sashiko-bot
2026-10-06 16:13 ` [PATCH 2/6] perf test attr: Fix wrong size expectation for events Arnaldo Carvalho de Melo
2026-10-06 16:24 ` sashiko-bot
2026-10-06 16:13 ` [PATCH 3/6] perf test attr: Fix record dwarf sample_type expectation Arnaldo Carvalho de Melo
2026-10-06 16:18 ` sashiko-bot
2026-10-06 16:13 ` [PATCH 4/6] perf test attr: Fix legacy event encodings in group tests Arnaldo Carvalho de Melo
2026-10-06 16:30 ` sashiko-bot
2026-10-06 16:13 ` [PATCH 5/6] perf test attr: Fix default stat metrics expectations Arnaldo Carvalho de Melo
2026-10-06 16:26 ` sashiko-bot [this message]
2026-10-06 16:13 ` [PATCH 6/6] perf test attr: Relax group checking for ungrouped expectations Arnaldo Carvalho de Melo
2026-10-06 16:22 ` sashiko-bot
2026-10-07 0:00 ` [PATCH 0/6 v1] perf test attr: Fix the re-enabled test Namhyung Kim
2026-10-07 0:22 ` Namhyung Kim
2026-10-07 5:58 ` Arnaldo Melo
2026-10-07 8:31 ` Arnaldo Carvalho de 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=sashiko-outbox-162255@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acme@kernel.org \
--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