From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@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@kernel.org>
Subject: [PATCH v1 00/17] perf tests: Add coverage for the untested perf subcommands
Date: Tue, 24 Nov 2026 15:45:47 -0300 [thread overview]
Message-ID: <20261124184604.24983-1-acme@kernel.org> (raw)
Hi,
The v12 "perf coverage: A harness for perf, and the fixes it found"
series is still unmerged. The coverage analysis done for it showed
that several perf subcommands had no shell test coverage at all, and it
also caught two issues in the existing tests. This series is that
result, made independent of the harness: everything here applies to
perf-tools-next with nothing from v12, so it can be considered on its
own while that series is still being reviewed.
Patches 1-2 fix existing tests, patches 3-17 add or extend tests for
the subcommands the analysis found untested. All changes are in
tools/perf/tests/shell/, no production code is touched.
- perf top pins its ring buffer to the default data size, so the
result does not depend on the host's perf_event_mlock_kb (1).
- perf sched captures the workload output before grepping it, so a
saturating grep cannot kill the producer with SIGPIPE;
--no-inherit was dropped, it is already cleared for CPU-wide
recording (2).
- help (3) and config (4) get their first tests; help -a works in
build trees via a dummy exec path.
- script list, fields and dump (5), report and diff sort keys (6).
- diff options (7) are checked by what each changes: the compute
formulas by their column, --time by a window that shows nothing,
-o by the entry order, -b on a file whose entries have no baseline
match.
- annotate (8) and report (9) options the same way; the ones with
nothing to observe in stdio output run as parse checks.
- record (10), trace (11) and timechart (12) options.
- kmem (13) and bench (14) get their first tests; the bench ones
skip cleanly when root or the hardware is missing, including
benchmarks that skip themselves with a zero exit status.
- lock (15) report and info, probe (16) variable and line listing.
- report TUI (17): the six browsers are driven from a pty.
Running as non-root on this host, 13 of the 17 scripts exit 0; perf
sched, kmem, lock and trace need root and exit 2 with their skip
message, as designed. All option names and expectations were checked
against the built perf -h output and the sources.
The tests, the two fixes and the review fixes were developed with an AI
coding assistant (OpenCode): it drafted the tests, found the two issues
above and processed three rounds of review findings. Every commit was
reviewed, amended and run here before posting.
Arnaldo Carvalho de Melo (17):
perf tests top: Pin the ring buffer size
perf tests sched: Exercise the sched views and options
perf tests help: Add a basic perf help test
perf tests config: Exercise the config file and list options
perf tests script: Exercise the list, fields and dump options
perf tests sort: Exercise the report and diff sort keys
perf tests diff: Exercise the output options
perf tests annotate: Exercise the output and filter options
perf tests report: Exercise the output and format options
perf tests record: Exercise more record options
perf tests trace: Exercise the tracing options
perf tests timechart: Exercise the report options
perf tests kmem: Add a basic perf kmem test
perf tests bench: Add smoke tests for perf bench
perf tests lock: Exercise perf lock report and info
perf tests probe: Exercise the variable and line listing
perf tests report: Exercise the TUI browsers
tools/perf/tests/shell/annotate.sh | 64 +++++++
tools/perf/tests/shell/bench.sh | 130 +++++++++++++
tools/perf/tests/shell/config.sh | 134 ++++++++++++++
tools/perf/tests/shell/diff.sh | 191 ++++++++++++++++++-
tools/perf/tests/shell/help.sh | 80 ++++++++
tools/perf/tests/shell/kmem.sh | 215 ++++++++++++++++++++++
tools/perf/tests/shell/lock_contention.sh | 40 ++++
tools/perf/tests/shell/probe_vars.sh | 80 ++++++++
tools/perf/tests/shell/record_options.sh | 173 +++++++++++++++++
tools/perf/tests/shell/report_options.sh | 122 ++++++++++++
tools/perf/tests/shell/report_tui.sh | 112 +++++++++++
tools/perf/tests/shell/sched.sh | 154 +++++++++++-----
tools/perf/tests/shell/script.sh | 131 ++++++++++++-
tools/perf/tests/shell/sort.sh | 72 ++++++++
tools/perf/tests/shell/timechart.sh | 46 +++++
tools/perf/tests/shell/top.sh | 7 +-
tools/perf/tests/shell/trace_options.sh | 97 ++++++++++
17 files changed, 1794 insertions(+), 54 deletions(-)
create mode 100755 tools/perf/tests/shell/bench.sh
create mode 100755 tools/perf/tests/shell/config.sh
create mode 100755 tools/perf/tests/shell/help.sh
create mode 100755 tools/perf/tests/shell/kmem.sh
create mode 100755 tools/perf/tests/shell/probe_vars.sh
create mode 100755 tools/perf/tests/shell/record_options.sh
create mode 100755 tools/perf/tests/shell/report_options.sh
create mode 100755 tools/perf/tests/shell/report_tui.sh
create mode 100755 tools/perf/tests/shell/sort.sh
create mode 100755 tools/perf/tests/shell/trace_options.sh
--
2.56.0
next reply other threads:[~2026-11-24 18:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 18:45 Arnaldo Carvalho de Melo [this message]
2026-11-24 18:45 ` [PATCH v1 01/17] perf tests top: Pin the ring buffer size Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 02/17] perf tests sched: Exercise the sched views and options Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 03/17] perf tests help: Add a basic perf help test Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 04/17] perf tests config: Exercise the config file and list options Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 05/17] perf tests script: Exercise the list, fields and dump options Arnaldo Carvalho de Melo
2026-11-24 18:54 ` sashiko-bot
2026-11-24 18:45 ` [PATCH v1 06/17] perf tests sort: Exercise the report and diff sort keys Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 07/17] perf tests diff: Exercise the output options Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 08/17] perf tests annotate: Exercise the output and filter options Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 09/17] perf tests report: Exercise the output and format options Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 10/17] perf tests record: Exercise more record options Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 11/17] perf tests trace: Exercise the tracing options Arnaldo Carvalho de Melo
2026-11-24 18:45 ` [PATCH v1 12/17] perf tests timechart: Exercise the report options Arnaldo Carvalho de Melo
2026-11-24 18:46 ` [PATCH v1 13/17] perf tests kmem: Add a basic perf kmem test Arnaldo Carvalho de Melo
2026-11-24 18:46 ` [PATCH v1 14/17] perf tests bench: Add smoke tests for perf bench Arnaldo Carvalho de Melo
2026-11-24 18:46 ` [PATCH v1 15/17] perf tests lock: Exercise perf lock report and info Arnaldo Carvalho de Melo
2026-11-24 18:46 ` [PATCH v1 16/17] perf tests probe: Exercise the variable and line listing Arnaldo Carvalho de Melo
2026-11-24 18:46 ` [PATCH v1 17/17] perf tests report: Exercise the TUI browsers 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=20261124184604.24983-1-acme@kernel.org \
--to=acme@kernel.org \
--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