]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf test: Add file offset diagnostic test for corrupted perf.data
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 Jun 2026 23:45:14 +0000 (20:45 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 3 Jun 2026 19:31:04 +0000 (16:31 -0300)
commit078fc0430bf17e2a571e36877c1942f6c0860524
tree7c6a759768b938d5eeea31a080916ff7f7910434
parent1e2c83f732deb329ebce23e26cbc482f4c4bf194
perf test: Add file offset diagnostic test for corrupted perf.data

Add a shell test that verifies the file_offset diagnostic messages
work correctly when perf encounters corrupted events.

The test corrupts a MMAP2 event's size field in a recorded perf.data
file, then checks that perf report produces warning messages that
include both the file offset (e.g. "at offset 0x2738:") and the
event type name with numeric id (e.g. "MMAP2 (10)").

This exercises the diagnostic improvements from the file_offset
series, which retrofitted all skip/stop/error messages to include
the position and type of the problematic event.

Reviewed-by: Ian Rogers <irogers@google.com>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/data_file_offset_diagnostics.sh [new file with mode: 0755]