]> git.ipfire.org Git - thirdparty/linux.git/commit
perf test: Fix ratio_to_prev event parsing test
authorThomas Falcon <thomas.falcon@intel.com>
Fri, 27 Mar 2026 01:59:27 +0000 (20:59 -0500)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 2 Apr 2026 19:51:10 +0000 (12:51 -0700)
commit77cb9b443b7fff2a93d78cd2e309db030046772f
treeb0577bdc7353fa3fedc25d0fd172c2c91c26a10e
parent9a82bfde4775b7a87cd1a7e791f46f83ae442848
perf test: Fix ratio_to_prev event parsing test

test__ratio_to_prev() assumed the first event in a group is the leader,
which is not the case when the event is expanded into two event groups
on hybrid PMU's with auto counter reload support. Instead, iterate over the
event group generated for each core PMU. Also update "wrong leader" test to
check that the subordinate event has the correct leader instead of checking
that it is not the group leader. Finally, do not exit immediately if a PMU
without auto counter reload support is found.

Signed-off-by: Thomas Falcon <thomas.falcon@intel.com>
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Fixes: 56be0fe5f62c ("perf record: Add auto counter reload parse and regression tests")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/parse-events.c