From: Ian Rogers <irogers@google.com>
To: irogers@google.com, acme@kernel.org, namhyung@kernel.org
Cc: 9erthalion6@gmail.com, adrian.hunter@intel.com,
alexander.shishkin@linux.intel.com, collin.funk1@gmail.com,
german.gomez@arm.com, james.clark@linaro.org, jolsa@kernel.org,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
mingo@redhat.com, peterz@infradead.org, zide.chen@intel.com
Subject: [PATCH v6 0/2] perf tests: Add uncore and x86 topdown event sorting tests
Date: Sun, 17 May 2026 19:32:23 -0700 [thread overview]
Message-ID: <20260518023225.2472122-1-irogers@google.com> (raw)
In-Reply-To: <20260518003704.2434308-1-irogers@google.com>
A patch thread changing event sorting highlighted a lack of testing
for the more complicated uncore and x86 perf metric event sorting:
https://lore.kernel.org/linux-perf-users/CAP-5=fWRgDo7UnJAD4C--d=mVPRhOEWZVyU7nVM1YEp3jncAgg@mail.gmail.com/
v6: - Ensure robust error initialization and resource cleanup in both
uncore and topdown tests by initializing evlist to NULL and
parse_events_error at function entry, preventing uninitialized
stack access or resource leaks on early return paths (reported
by Sashiko).
- Prevent double evaluation and duplicate debug logging upon test
assertion failure in the x86 topdown test by caching test_sort()
return values into local variables (reported by Sashiko).
v5: - Strengthen uncore event sorting test assertions to require at
least 4 total events (>= 2 groups of 2 events) instead of > 0
events, guaranteeing that multi-PMU wildcard expansion is
genuinely exercised across multiple sibling PMUs (reported by Sashiko).
- Fix memory leaks on assertion failure across both uncore and
topdown test suites by replacing standard TEST_ASSERT macros
with local CHECK macros that correctly branch to out_err cleanup
handlers (reported by Sashiko).
- Fix test_sort() in the x86 topdown test to correctly return TEST_FAIL (-1)
instead of parse_events() internal error codes (e.g., -EINVAL) when event
parsing fails (reported by Namhyung).
v4: Fix malformed event group string formatting in the uncore event
sorting test when running on AMD systems (where sysfs event
aliases lack JSON descriptions - reported by Namhyung). Added a
helper to strip redundant PMU prefixes and trailing slashes to
ensure parse_events() receives valid syntax across all
architectures.
v3: Address sashiko nits on using evsel__name and ensuring slots is injected.
https://lore.kernel.org/linux-perf-users/20260331185419.4085479-1-irogers@google.com/
v2: Address indentation and other nits from Namhyung. Add Zide Chen's
tested-by tags.
https://lore.kernel.org/lkml/20260331165207.4016392-1-irogers@google.com/
v1: https://lore.kernel.org/lkml/20260325183045.1229502-1-irogers@google.com/
Ian Rogers (2):
perf tests: Add test for uncore event sorting
perf arch x86 tests: Add test for topdown event sorting
tools/perf/arch/x86/tests/topdown.c | 159 ++++++++++++++++++++-
tools/perf/tests/Build | 1 +
tools/perf/tests/builtin-test.c | 1 +
tools/perf/tests/tests.h | 1 +
tools/perf/tests/uncore-event-sorting.c | 178 ++++++++++++++++++++++++
5 files changed, 339 insertions(+), 1 deletion(-)
create mode 100644 tools/perf/tests/uncore-event-sorting.c
--
2.54.0.563.g4f69b47b94-goog
next prev parent reply other threads:[~2026-05-18 2:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 18:30 [PATCH v1 0/2] perf tests: Add tests for uncore and perf metric event sorting Ian Rogers
2026-03-25 18:30 ` [PATCH v1 1/2] perf tests: Add test for uncore " Ian Rogers
2026-03-27 23:36 ` Chen, Zide
2026-03-31 3:06 ` Namhyung Kim
2026-03-25 18:30 ` [PATCH v1 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-03-30 21:53 ` Chen, Zide
2026-03-31 3:08 ` Namhyung Kim
2026-03-31 16:52 ` [PATCH v2 0/2] perf tests: Add tests for uncore and perf metric " Ian Rogers
2026-03-31 16:52 ` [PATCH v2 1/2] perf tests: Add test for uncore " Ian Rogers
2026-03-31 16:52 ` [PATCH v2 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-03-31 18:54 ` [PATCH v3 0/2] Add tests for uncore and perf metric " Ian Rogers
2026-03-31 18:54 ` [PATCH v3 1/2] perf tests: Add test for uncore " Ian Rogers
2026-04-01 21:48 ` Namhyung Kim
2026-03-31 18:54 ` [PATCH v3 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-04-01 3:33 ` Namhyung Kim
2026-05-17 23:28 ` [PATCH v4 0/2] perf tests: Add uncore and x86 topdown event sorting tests Ian Rogers
2026-05-17 23:28 ` [PATCH v4 1/2] perf tests: Add test for uncore event sorting Ian Rogers
2026-05-17 23:28 ` [PATCH v4 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-05-18 0:37 ` [PATCH v5 0/2] perf tests: Add uncore and x86 topdown event sorting tests Ian Rogers
2026-05-18 0:37 ` [PATCH v5 1/2] perf tests: Add test for uncore event sorting Ian Rogers
2026-05-18 0:37 ` [PATCH v5 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-05-18 2:32 ` Ian Rogers [this message]
2026-05-18 2:32 ` [PATCH v6 1/2] perf tests: Add test for uncore " Ian Rogers
2026-05-18 2:32 ` [PATCH v6 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-05-18 4:31 ` [PATCH v7 0/2] perf tests: Add uncore and x86 topdown event sorting tests Ian Rogers
2026-05-18 4:31 ` [PATCH v7 1/2] perf tests: Add test for uncore event sorting Ian Rogers
2026-05-18 4:31 ` [PATCH v7 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-05-18 6:29 ` [PATCH v8 0/2] perf tests: Add uncore and x86 topdown event sorting tests Ian Rogers
2026-05-18 6:29 ` [PATCH v8 1/2] perf tests: Add test for uncore event sorting Ian Rogers
2026-05-18 6:29 ` [PATCH v8 2/2] perf arch x86 tests: Add test for topdown " Ian Rogers
2026-05-20 15:31 ` [PATCH v8 0/2] perf tests: Add uncore and x86 topdown event sorting tests Ian Rogers
2026-05-20 20:28 ` Namhyung Kim
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=20260518023225.2472122-1-irogers@google.com \
--to=irogers@google.com \
--cc=9erthalion6@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=collin.funk1@gmail.com \
--cc=german.gomez@arm.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@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=zide.chen@intel.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
Powered by JetHome