* [PATCH 0/2] perf test attr: Fix and re-enable the test
@ 2026-09-24 22:30 Michael Petlan
2026-09-24 22:30 ` [PATCH 1/2] perf test attr: Propagate the return value from the test to the wrapper Michael Petlan
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Michael Petlan @ 2026-09-24 22:30 UTC (permalink / raw)
To: linux-perf-users, irogers, namhyung; +Cc: acme
Hello all,
I have noticed that a testcase formerly known as "Setup struct perf_event_attr",
later renamed to "Perf attribute expectations test" has been disabled by
accident during the move.
That also probably led to forgetting to update the struct size, which is now
fixed by the second patch.
Michael
Michael Petlan (2):
perf test attr: Propagate the return value from the test to the
wrapper
perf test attr: Fix wrong size expectation for events
tools/perf/tests/shell/attr.sh | 1 +
tools/perf/tests/shell/attr/base-record | 2 +-
tools/perf/tests/shell/attr/base-stat | 2 +-
tools/perf/tests/shell/attr/system-wide-dummy | 2 +-
tools/perf/tests/shell/attr/test-record-dummy-C0 | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
--
2.52.0
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/2] perf test attr: Propagate the return value from the test to the wrapper 2026-09-24 22:30 [PATCH 0/2] perf test attr: Fix and re-enable the test Michael Petlan @ 2026-09-24 22:30 ` Michael Petlan 2026-09-24 22:32 ` sashiko-bot 2026-09-24 22:30 ` [PATCH 2/2] perf test attr: Fix wrong size expectation for events Michael Petlan 2026-10-05 22:47 ` [PATCH 0/2] perf test attr: Fix and re-enable the test Namhyung Kim 2 siblings, 1 reply; 9+ messages in thread From: Michael Petlan @ 2026-09-24 22:30 UTC (permalink / raw) To: linux-perf-users, irogers, namhyung; +Cc: acme Currently it does not matter what the python script actually returns, the test always passes, as the $err variable is always 0. Fix that. Fixes: 8519e4f44c2af72214dc029f0334be068466e71f perf test: Add a shell wrapper for "Setup struct perf_event_attr" Signed-off-by: Michael Petlan <mpetlan@redhat.com> --- tools/perf/tests/shell/attr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/tests/shell/attr.sh b/tools/perf/tests/shell/attr.sh index 5a4e43b2471d..307e1535795a 100755 --- a/tools/perf/tests/shell/attr.sh +++ b/tools/perf/tests/shell/attr.sh @@ -18,5 +18,6 @@ trap trap_cleanup EXIT TERM INT shelldir=$(dirname "$0") perf_path=$(which perf) python "${shelldir}"/lib/attr.py -d "${shelldir}"/attr -v -p "$perf_path" +err=$? cleanup exit $err -- 2.52.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] perf test attr: Propagate the return value from the test to the wrapper 2026-09-24 22:30 ` [PATCH 1/2] perf test attr: Propagate the return value from the test to the wrapper Michael Petlan @ 2026-09-24 22:32 ` sashiko-bot 0 siblings, 0 replies; 9+ messages in thread From: sashiko-bot @ 2026-09-24 22:32 UTC (permalink / raw) To: Michael Petlan; +Cc: linux-perf-users > Currently it does not matter what the python script actually returns, > the test always passes, as the $err variable is always 0. > > Fix that. > > Fixes: 8519e4f44c2af72214dc029f0334be068466e71f perf test: Add a shell wrapper for "Setup struct perf_event_attr" > > Signed-off-by: Michael Petlan <mpetlan@redhat.com> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/20260924223027.799654-1-mpetlan@redhat.com?part=1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] perf test attr: Fix wrong size expectation for events 2026-09-24 22:30 [PATCH 0/2] perf test attr: Fix and re-enable the test Michael Petlan 2026-09-24 22:30 ` [PATCH 1/2] perf test attr: Propagate the return value from the test to the wrapper Michael Petlan @ 2026-09-24 22:30 ` Michael Petlan 2026-09-24 22:34 ` sashiko-bot 2026-10-06 13:33 ` Arnaldo Carvalho de Melo 2026-10-05 22:47 ` [PATCH 0/2] perf test attr: Fix and re-enable the test Namhyung Kim 2 siblings, 2 replies; 9+ messages in thread From: Michael Petlan @ 2026-09-24 22:30 UTC (permalink / raw) To: linux-perf-users, irogers, namhyung; +Cc: acme Although config4 has been added into struct perf_event_attr, the size expectation for the struct hasn't been adjusted. This hasn't been noticed, since the testcase's return value has been ignored after rewriting the testcase to python until previous commit. Fix that. Fixes: 80cdf208117a36de82a30d210b3b8df0f193e75b ("tools headers UAPI: Sync linux/perf_event.h with the kernel sources") Fixes: cbbfba4847b8a5299d36e002bf864b21bb83295d ("perf: Add perf_event_attr::config4") Signed-off-by: Michael Petlan <mpetlan@redhat.com> --- tools/perf/tests/shell/attr/base-record | 2 +- tools/perf/tests/shell/attr/base-stat | 2 +- tools/perf/tests/shell/attr/system-wide-dummy | 2 +- tools/perf/tests/shell/attr/test-record-dummy-C0 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/tests/shell/attr/base-record b/tools/perf/tests/shell/attr/base-record index b44e4e6e4443..dd76fbdb628f 100644 --- a/tools/perf/tests/shell/attr/base-record +++ b/tools/perf/tests/shell/attr/base-record @@ -5,7 +5,7 @@ group_fd=-1 flags=0|8 cpu=* type=0|1 -size=136 +size=144 config=0|1 sample_period=* sample_type=263 diff --git a/tools/perf/tests/shell/attr/base-stat b/tools/perf/tests/shell/attr/base-stat index fccd8ec4d1b0..d769e69bb4f5 100644 --- a/tools/perf/tests/shell/attr/base-stat +++ b/tools/perf/tests/shell/attr/base-stat @@ -5,7 +5,7 @@ group_fd=-1 flags=0|8 cpu=* type=0 -size=136 +size=144 config=0 sample_period=0 sample_type=65536 diff --git a/tools/perf/tests/shell/attr/system-wide-dummy b/tools/perf/tests/shell/attr/system-wide-dummy index a1e1d6a263bf..9806de3d9c9e 100644 --- a/tools/perf/tests/shell/attr/system-wide-dummy +++ b/tools/perf/tests/shell/attr/system-wide-dummy @@ -7,7 +7,7 @@ cpu=* pid=-1 flags=8 type=1 -size=136 +size=144 config=9 sample_period=1 # PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | diff --git a/tools/perf/tests/shell/attr/test-record-dummy-C0 b/tools/perf/tests/shell/attr/test-record-dummy-C0 index 91499405fff4..23e00e7f8ace 100644 --- a/tools/perf/tests/shell/attr/test-record-dummy-C0 +++ b/tools/perf/tests/shell/attr/test-record-dummy-C0 @@ -10,7 +10,7 @@ cpu=0 pid=-1 flags=8 type=1 -size=136 +size=144 config=9 sample_period=4000 # PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | -- 2.52.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf test attr: Fix wrong size expectation for events 2026-09-24 22:30 ` [PATCH 2/2] perf test attr: Fix wrong size expectation for events Michael Petlan @ 2026-09-24 22:34 ` sashiko-bot 2026-10-06 13:33 ` Arnaldo Carvalho de Melo 1 sibling, 0 replies; 9+ messages in thread From: sashiko-bot @ 2026-09-24 22:34 UTC (permalink / raw) To: Michael Petlan; +Cc: linux-perf-users > Although config4 has been added into struct perf_event_attr, the size > expectation for the struct hasn't been adjusted. This hasn't been > noticed, since the testcase's return value has been ignored after > rewriting the testcase to python until previous commit. > > Fix that. > > Fixes: 80cdf208117a36de82a30d210b3b8df0f193e75b ("tools headers UAPI: Sync linux/perf_event.h with the kernel sources") > Fixes: cbbfba4847b8a5299d36e002bf864b21bb83295d ("perf: Add perf_event_attr::config4") > > Signed-off-by: Michael Petlan <mpetlan@redhat.com> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/20260924223027.799654-1-mpetlan@redhat.com?part=2 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf test attr: Fix wrong size expectation for events 2026-09-24 22:30 ` [PATCH 2/2] perf test attr: Fix wrong size expectation for events Michael Petlan 2026-09-24 22:34 ` sashiko-bot @ 2026-10-06 13:33 ` Arnaldo Carvalho de Melo 2026-10-06 15:26 ` Arnaldo Carvalho de Melo 1 sibling, 1 reply; 9+ messages in thread From: Arnaldo Carvalho de Melo @ 2026-10-06 13:33 UTC (permalink / raw) To: Michael Petlan; +Cc: linux-perf-users, irogers, namhyung, acme On Fri, Sep 25, 2026 at 12:30:27AM +0200, Michael Petlan wrote: > Although config4 has been added into struct perf_event_attr, the size > expectation for the struct hasn't been adjusted. This hasn't been > noticed, since the testcase's return value has been ignored after > rewriting the testcase to python until previous commit. > > Fix that. > > Fixes: 80cdf208117a36de82a30d210b3b8df0f193e75b ("tools headers UAPI: Sync linux/perf_event.h with the kernel sources") > Fixes: cbbfba4847b8a5299d36e002bf864b21bb83295d ("perf: Add perf_event_attr::config4") This cset changes a kernel header, kernel developers are not expected to update tools/ living code, they are welcomed to do so, so it didn't introduce a problem, so the cset that updates the tools/include/ is the one that should be in the fixes. I was going to do that when I noticed this: #define PERF_ATTR_SIZE_VER9 144 /* add: config4 */ +#define PERF_ATTR_SIZE_VER10 176 /* Add: sample_simd_{vec|pred}_reg_* */ in tools/include/uapi/linux/perf_event.h, i.e. with your patch it will continue broken, as it is not taking into account this one: commit eb89aef367e4701038869e1ddfa719463524e3e3 Author: Dapeng Mi <dapeng1.mi@linux.intel.com> Date: Mon Sep 14 09:40:43 2026 +0800 perf headers: Sync perf_event.h/perf_regs.h with the kernel headers Sync the UAPI header changes of supporting SIMD/eGPRs/SSP sampling into corresponding tools UAPI headers. So I'm updating your patch to have 176 instead of 144. The test is still failing tho, for some other reason: running '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-default' test limitation '!aarch64' excluded architecture list ['aarch64'] running '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-default-aarch64' test limitation 'aarch64' skipped [x86_64] '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-default-aarch64' running '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-dwarf' expected sample_type=45359, got 12583 FAILED '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-dwarf' - 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 root@x2:~# Investigating. - Arnaldo > Signed-off-by: Michael Petlan <mpetlan@redhat.com> > --- > tools/perf/tests/shell/attr/base-record | 2 +- > tools/perf/tests/shell/attr/base-stat | 2 +- > tools/perf/tests/shell/attr/system-wide-dummy | 2 +- > tools/perf/tests/shell/attr/test-record-dummy-C0 | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/tests/shell/attr/base-record b/tools/perf/tests/shell/attr/base-record > index b44e4e6e4443..dd76fbdb628f 100644 > --- a/tools/perf/tests/shell/attr/base-record > +++ b/tools/perf/tests/shell/attr/base-record > @@ -5,7 +5,7 @@ group_fd=-1 > flags=0|8 > cpu=* > type=0|1 > -size=136 > +size=144 > config=0|1 > sample_period=* > sample_type=263 > diff --git a/tools/perf/tests/shell/attr/base-stat b/tools/perf/tests/shell/attr/base-stat > index fccd8ec4d1b0..d769e69bb4f5 100644 > --- a/tools/perf/tests/shell/attr/base-stat > +++ b/tools/perf/tests/shell/attr/base-stat > @@ -5,7 +5,7 @@ group_fd=-1 > flags=0|8 > cpu=* > type=0 > -size=136 > +size=144 > config=0 > sample_period=0 > sample_type=65536 > diff --git a/tools/perf/tests/shell/attr/system-wide-dummy b/tools/perf/tests/shell/attr/system-wide-dummy > index a1e1d6a263bf..9806de3d9c9e 100644 > --- a/tools/perf/tests/shell/attr/system-wide-dummy > +++ b/tools/perf/tests/shell/attr/system-wide-dummy > @@ -7,7 +7,7 @@ cpu=* > pid=-1 > flags=8 > type=1 > -size=136 > +size=144 > config=9 > sample_period=1 > # PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | > diff --git a/tools/perf/tests/shell/attr/test-record-dummy-C0 b/tools/perf/tests/shell/attr/test-record-dummy-C0 > index 91499405fff4..23e00e7f8ace 100644 > --- a/tools/perf/tests/shell/attr/test-record-dummy-C0 > +++ b/tools/perf/tests/shell/attr/test-record-dummy-C0 > @@ -10,7 +10,7 @@ cpu=0 > pid=-1 > flags=8 > type=1 > -size=136 > +size=144 > config=9 > sample_period=4000 > # PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | > -- > 2.52.0 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] perf test attr: Fix wrong size expectation for events 2026-10-06 13:33 ` Arnaldo Carvalho de Melo @ 2026-10-06 15:26 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 9+ messages in thread From: Arnaldo Carvalho de Melo @ 2026-10-06 15:26 UTC (permalink / raw) To: Michael Petlan; +Cc: linux-perf-users, irogers, namhyung, acme On Tue, Oct 06, 2026 at 03:33:57PM +0200, Arnaldo Carvalho de Melo wrote: > The test is still failing tho, for some other reason: > running '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-default' > test limitation '!aarch64' > excluded architecture list ['aarch64'] > running '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-default-aarch64' > test limitation 'aarch64' > skipped [x86_64] '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-default-aarch64' > running '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-dwarf' > expected sample_type=45359, got 12583 > FAILED '/home/acme/libexec/perf-core/tests/shell/attr/test-record-graph-dwarf' - match failure > ---- end(-1) ---- > 82: Perf attribute expectations test : FAILED! Some fixes for problems undetected because of the lack of error propagation: ⬢ [acme@tb-x2-perf perf-tools-next]$ git log --oneline -5 027108ff3952e8ae (HEAD -> perf-tools-next) perf test attr: Fix legacy event encodings in group tests 12d947c0d8e7aac6 perf test attr: Fix record dwarf sample_type expectation cec590f3de003895 perf test attr: Fix wrong size expectation for events 04a0a19ede01e771 perf test attr: Propagate the return value from the test to the wrapper 1dc462fc21490767 (perf-tools-next.korg/tmp.perf-tools-next, perf-tools-next.korg/perf-tools-next, five/perf-tools-next, acme.korg/tmp.perf-tools-next, acme.korg/perf-tools-next) perf test: Add a test for perf timechart --tui ⬢ [acme@tb-x2-perf perf-tools-next]$ Still working to see all gets fixed and that test passes again. - Arnado ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] perf test attr: Fix and re-enable the test 2026-09-24 22:30 [PATCH 0/2] perf test attr: Fix and re-enable the test Michael Petlan 2026-09-24 22:30 ` [PATCH 1/2] perf test attr: Propagate the return value from the test to the wrapper Michael Petlan 2026-09-24 22:30 ` [PATCH 2/2] perf test attr: Fix wrong size expectation for events Michael Petlan @ 2026-10-05 22:47 ` Namhyung Kim 2026-10-06 13:13 ` Arnaldo Carvalho de Melo 2 siblings, 1 reply; 9+ messages in thread From: Namhyung Kim @ 2026-10-05 22:47 UTC (permalink / raw) To: Michael Petlan; +Cc: linux-perf-users, irogers, acme Hello, On Fri, Sep 25, 2026 at 12:30:25AM +0200, Michael Petlan wrote: > Hello all, > > I have noticed that a testcase formerly known as "Setup struct perf_event_attr", > later renamed to "Perf attribute expectations test" has been disabled by > accident during the move. > > That also probably led to forgetting to update the struct size, which is now > fixed by the second patch. > > Michael > > > Michael Petlan (2): > perf test attr: Propagate the return value from the test to the > wrapper > perf test attr: Fix wrong size expectation for events The "Fixes" tag format is a bit different, but otherwise Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] perf test attr: Fix and re-enable the test 2026-10-05 22:47 ` [PATCH 0/2] perf test attr: Fix and re-enable the test Namhyung Kim @ 2026-10-06 13:13 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 9+ messages in thread From: Arnaldo Carvalho de Melo @ 2026-10-06 13:13 UTC (permalink / raw) To: Namhyung Kim; +Cc: Michael Petlan, linux-perf-users, irogers, acme On Mon, Oct 05, 2026 at 03:47:25PM -0700, Namhyung Kim wrote: > On Fri, Sep 25, 2026 at 12:30:25AM +0200, Michael Petlan wrote: > > I have noticed that a testcase formerly known as "Setup struct perf_event_attr", > > later renamed to "Perf attribute expectations test" has been disabled by > > accident during the move. > > That also probably led to forgetting to update the struct size, which is now > > fixed by the second patch. > > Michael Petlan (2): > > perf test attr: Propagate the return value from the test to the > > wrapper > > perf test attr: Fix wrong size expectation for events > The "Fixes" tag format is a bit different, but otherwise I fixed the Fixes tags. > Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, applied both patches, - Arnaldo ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-10-06 15:26 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-24 22:30 [PATCH 0/2] perf test attr: Fix and re-enable the test Michael Petlan 2026-09-24 22:30 ` [PATCH 1/2] perf test attr: Propagate the return value from the test to the wrapper Michael Petlan 2026-09-24 22:32 ` sashiko-bot 2026-09-24 22:30 ` [PATCH 2/2] perf test attr: Fix wrong size expectation for events Michael Petlan 2026-09-24 22:34 ` sashiko-bot 2026-10-06 13:33 ` Arnaldo Carvalho de Melo 2026-10-06 15:26 ` Arnaldo Carvalho de Melo 2026-10-05 22:47 ` [PATCH 0/2] perf test attr: Fix and re-enable the test Namhyung Kim 2026-10-06 13:13 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox