Skip to content

perf test attr: Fix the re-enabled test

Arnaldo Carvalho de Melo linux-perf-users lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6perf test attr: Propagate the return value from the test to the wrappertools/perf/tests/shell/attr.sh+1 -00 replies
2/6perf test attr: Fix wrong size expectation for eventstools/perf/tests/shell/attr/base-record tools/perf/tests/shell/attr/base-stat tools/perf/tests/shell/attr/system-wide-dummy +1 more+4 -40 replies
3/6perf test attr: Fix record dwarf sample_type expectationtools/perf/tests/shell/attr/test-record-graph-dwarf+1 -10 replies
4/6perf test attr: Fix legacy event encodings in group teststools/perf/tests/shell/attr/README tools/perf/tests/shell/attr/test-record-group-sampling tools/perf/tests/shell/attr/test-record-group-sampling1 +5 more+15 -150 replies
5/6perf test attr: Fix default stat metrics expectationstools/perf/tests/shell/attr/base-stat tools/perf/tests/shell/attr/test-stat-default tools/perf/tests/shell/attr/test-stat-detailed-1 +2 more+123 -110 replies
6/6perf test attr: Relax group checking for ungrouped expectationstools/perf/tests/shell/lib/attr.py+8 -30 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNamhyung KimArnaldo Carvalho de MeloIan Rogers
SeriesR-b
1/6A-b T-b
2/6A-b T-b
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6 v1] perf test attr: Fix the re-enabled test

From: Arnaldo Carvalho de Melo <[email protected]>

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.

Arnaldo

Arnaldo Carvalho de Melo (4):
perf test attr: Fix record dwarf sample_type expectation perf test attr: Fix legacy event encodings in group tests perf test attr: Fix default stat metrics expectations perf test attr: Relax group checking for ungrouped expectations

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/README            | 10 +++---
 tools/perf/tests/shell/attr/base-record       |  2 +-
 tools/perf/tests/shell/attr/base-stat         |  8 ++---
 tools/perf/tests/shell/attr/system-wide-dummy |  2 +-
 .../tests/shell/attr/test-record-dummy-C0     |  2 +-
 .../tests/shell/attr/test-record-graph-dwarf  |  2 +-
 .../shell/attr/test-record-group-sampling     |  4 +--
 .../shell/attr/test-record-group-sampling1    |  4 +--
 .../shell/attr/test-record-group-sampling2    |  4 +--
 .../perf/tests/shell/attr/test-record-group1  |  2 +-
 .../perf/tests/shell/attr/test-record-group2  |  2 +-
 .../perf/tests/shell/attr/test-record-group3  |  2 +-
 tools/perf/tests/shell/attr/test-stat-default | 32 +++++++++++++++++--
 .../tests/shell/attr/test-stat-detailed-1     | 32 +++++++++++++++++--
 .../tests/shell/attr/test-stat-detailed-2     | 32 +++++++++++++++++--
 .../tests/shell/attr/test-stat-detailed-3     | 32 +++++++++++++++++--
 tools/perf/tests/shell/attr/test-stat-group1  |  2 +-
 tools/perf/tests/shell/lib/attr.py            | 11 +++++--
 19 files changed, 152 insertions(+), 34 deletions(-)
Signature · 1 line
2.55.0