From: Arnaldo Melo <arnaldo.melo@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
James Clark <james.clark@linaro.org>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Clark Williams <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 0/6 v1] perf test attr: Fix the re-enabled test
Date: Wed, 07 Oct 2026 07:58:12 +0200 [thread overview]
Message-ID: <EE4F4624-D728-4D59-A15D-70EEC29229DA@gmail.com> (raw)
In-Reply-To: <asWQvXRdqp_RK85c@google.com>
On October 7, 2026 2:22:21 AM GMT+02:00, Namhyung Kim <namhyung@kernel.org> wrote:
>On Tue, Oct 06, 2026 at 05:00:26PM -0700, Namhyung Kim wrote:
>> On Tue, Oct 06, 2026 at 06:13:03PM +0200, Arnaldo Carvalho de Melo wrote:
>> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
>> >
>> > Hello all,
>> >
>> > This series fixes the "Perf attribute expectations test" (perf test 82,
>> > formerly "Setup struct perf_event_attr").
>> >
>> > Patches 1-2 are Michael Petlan's prerequisite fixes that make the shell
>> > wrapper propagate attr.py's return value and correct the
>> > perf_event_attr size expectation after struct config4 was added. They
>> > are included at the start of the series so that it applies cleanly on
>> > the current perf-tools-next (and for the review bots to verify the new
>> > patches); the new fixes are patches 3-6.
>> >
>> > With the test reporting failures again, several stale expectations
>> > surfaced and are addressed here:
>> >
>> > - test-record-graph-dwarf still expected PERF_SAMPLE_ADDR and
>> > PERF_SAMPLE_DATA_SRC for --call-graph dwarf. Those were dropped by
>> > bdd051e249141c79 ("perf record: Split --data-mmap option"), which
>> > decoupled data MMAP recording from the sample address bits.
>> >
>> > - The record and stat group tests expected cache-misses and
>> > instructions to be the legacy PERF_TYPE_HARDWARE events, but since
>> > b1c5efbfd92eb84d ("perf parse-events: Remove hard coded legacy
>> > hardware and cache parsing") they resolve to the core PMU sysfs/JSON
>> > events, so request the legacy encodings explicitly with the
>> > legacy-hardware-config term.
>> >
>> > - The perf stat default metrics open their events in groups and the
>> > raw encodings of instructions, branch-misses, cpu-cycles and
>> > stalled-cycles-frontend/backend differ between Intel and AMD, so
>> > base-stat now accepts the standalone and group variants and
>> > test-stat-default/detailed-{1,2,3} gained the per-vendor raw
>> > encodings.
>> >
>> > - attr.py no longer requires a recorded event to be in a group when
>> > the matching expectation does not declare one, allowing the stat
>> > tests to verify event attributes without encoding the metric
>> > grouping. Expectations that declare a group are still verified in
>> > both directions.
>> >
>> > The test passes with 'perf test -vv attribute' on x86_64. The AMD
>> > encodings come from the amd_pmu_event_map tables in
>> > arch/x86/events/amd/core.c.
>>
>> On my machine, the current tmp.perf-tools-next which contains these
>> changes fails like this.
>>
>> $ tools/perf/perf test -v 82
>> ---- start ----
>> test child forked, pid 931585
>> /home/namhyung/project/linux/tools/perf/tests/shell/attr.sh: line 20: python: command not found
>> ---- end(-1) ----
>> 82: Perf attribute expectations test : FAILED!
>>
>> === Test Summary ===
>> Passed main tests : 0
>> Passed subtests : 0
>> Skipped tests : 0
>> Failed tests : 1
>> List of failed tests:
>> 82: Perf attribute expectations test
>>
>> The below patch fixes the problem.
>
>Hmm.. even with the fix, it failed like this.
I'll address Sashiko's reviews and test this in more machines, Intel hybrid, AMD and arm64.
Will also incorporate your fix, thanks for testing it!
- Arnaldo.
>
>Thanks,
>Namhyung
>
>
> $ tools/perf/perf test -v 82
> ---- start ----
> ...
> expected mmap=1, got 0
> expected comm=1, got 0
> expected freq=1, got 0
> expected enable_on_exec=1, got 0
> expected task=1, got 0
> expected sample_id_all=1, got 0
> expected branch_sample_type=16, got 0
> FAILED '/home/namhyung/project/linux/tools/perf/tests/shell/attr/test-record-branch-filter-any_call' - match failure
> ---- end(-1) ----
> 82: Perf attribute expectations test : FAILED!
>
> === Test Summary ===
> Passed main tests : 0
> Passed subtests : 0
> Skipped tests : 0
> Failed tests : 1
> List of failed tests:
> 82: Perf attribute expectations test
>
- Arnaldo
next prev parent reply other threads:[~2026-10-07 5:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 16:13 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:13 ` [PATCH 2/6] perf test attr: Fix wrong size expectation for events Arnaldo Carvalho de Melo
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:13 ` [PATCH 4/6] perf test attr: Fix legacy event encodings in group tests Arnaldo Carvalho de Melo
2026-10-06 16:13 ` [PATCH 5/6] perf test attr: Fix default stat metrics expectations Arnaldo Carvalho de Melo
2026-10-06 16:13 ` [PATCH 6/6] perf test attr: Relax group checking for ungrouped expectations Arnaldo Carvalho de Melo
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 [this message]
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=EE4F4624-D728-4D59-A15D-70EEC29229DA@gmail.com \
--to=arnaldo.melo@gmail.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/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
all inboxes | Powered by JetHome®