linux/tools/perf/tests/shell
Ian Rogers 190c454638 perf test: Add inject ASLR test
Add a new shell test to verify the feature. The test covers:
- Basic address remapping for user space samples.
- Pipe mode coverage for piped into.
- Callchain address remapping.
- Consistency of output before and after injection.
- Pipe mode report consistency.
- Dropping of samples that leak ASLR info (physical addresses).
- Kernel address remapping (utilizing a dedicated kernel-intensive VFS
  dd workload to guarantee continuous timer interrupts sampling flow
  inside kernel privilege states).
- Kernel report consistency with address normalization.

The test suite is hardened with global 'set -o pipefail' assertions
to catch pipeline failures, stream-consuming awk processors to handle
SIGPIPE signals, and a dedicated pipe output scenario validating raw
'perf inject -o -' stdout streams.

Note on kernel DSO normalization in the test script:
The test script deliberately normalizes all kernel DSOs to a generic
[kernel] tag before diffing, as obfuscating physical kernel addresses
forces perf report to occasionally shift samples between individual
modules and [kernel.kallsyms] due to the lack of valid host module
boundary maps.

Note on ARM:
Kernel-based ASLR test cases (test_kernel_aslr and test_kernel_report_aslr)
are skipped on ARM architectures (aarch64 and arm*) to bypass high latency
constraints (such as check_invariants() spending excessive execution time
in maps__split_kallsyms() on debug builds) and symbolization inconsistencies.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: James Clark <james.clark@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Gabriel Marin <gmx@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-06-15 14:33:49 -03:00
..
attr perf test attr: Add missing int_mist.uop_dropping event to test-stat files 2025-09-19 12:41:50 -03:00
base_probe perf test perftool_testsuite: Use absolute paths 2025-10-01 09:44:05 -03:00
base_report perf test perftool_testsuite: Use absolute paths 2025-10-01 09:44:05 -03:00
common perf test perftool_testsuite: Use absolute paths 2025-10-01 09:44:05 -03:00
coresight perf test cs-etm: Move existing tests to coresight folder 2026-06-10 18:55:49 -03:00
lib perf test cs-etm: Remove unused Coresight workloads 2026-06-10 18:55:49 -03:00
addr2line_inlines.sh perf test addr2line_inlines: Ensure inline information shows on LBR leaves 2026-02-06 18:11:31 -03:00
amd-ibs-swfilt.sh perf test ibs: Skip privilege test on Zen6 and newer platforms 2026-05-22 21:31:16 -03:00
annotate.sh perf test annotate: Use --percent-limit rather than head to reduce output 2025-06-30 09:12:55 -07:00
attr.sh
buildid.sh perf tests buildid: Add purge and remove testing 2025-12-03 11:07:46 -08:00
c2c.sh perf tests c2c: Add a basic c2c 2025-12-03 11:07:46 -08:00
daemon.sh
data_file_offset_diagnostics.sh perf test: Add file offset diagnostic test for corrupted perf.data 2026-06-03 16:31:04 -03:00
data_type_profiling.sh perf test: Skip perf data type profiling tests for s390 2026-04-02 12:51:10 -07:00
data_validation.sh perf test: Add truncated perf.data robustness test 2026-05-29 11:44:35 -03:00
diff.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
drm_pmu.sh
evlist.sh perf test: Fix test perf evlist for z/VM s390x 2026-01-26 18:21:20 -03:00
ftrace.sh perf test: Fix nanosleep check in the ftrace test 2026-05-11 14:15:49 -03:00
header.sh perf header: Fix pipe mode header dumping 2025-07-03 11:22:17 -07:00
inject_aslr.sh perf test: Add inject ASLR test 2026-06-15 14:33:49 -03:00
inject-callchain.sh perf test: Add DWARF callchain conversion test 2026-01-20 17:18:24 -03:00
jitdump-python.sh perf test: Add python JIT dump test 2025-12-02 16:06:57 -08:00
kallsyms.sh perf tests kallsyms: Add basic kallsyms test 2025-12-03 11:07:47 -08:00
kvm.sh perf test kvm: Add stat live testing 2026-02-03 18:01:27 -03:00
kwork.sh perf tests kwork: Add basic kwork coverage tests 2026-04-02 19:44:45 -07:00
list.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
lock_contention.sh perf lock contention: Allow 'mmap_lock' in -L/--lock-filter 2026-06-04 17:34:52 -03:00
perf_sched_stats.sh perf test: Skip sched stats test for !root 2026-04-05 23:27:51 -07:00
perf-report-hierarchy.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
perftool-testsuite_probe.sh
perftool-testsuite_report.sh
pipe_test.sh
probe_vfs_getname.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
python-use.sh perf test: Add an 'import perf' test shell script 2025-10-01 16:59:06 -03:00
record_bpf_filter.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
record_lbr.sh perf test shell lbr: Avoid failures with perf event paranoia 2025-09-19 12:14:30 -03:00
record_offcpu.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
record_sideband.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
record_weak_term.sh perf test: Add test that command line period overrides sysfs/json values 2025-11-09 23:07:57 -08:00
record.sh perf test record.sh: Fix shellcheck warning 2026-02-08 11:29:58 -03:00
record+probe_libc_inet_pton.sh perf test: Fix inet_pton probe failure and unroll call graph 2026-04-13 23:28:14 -07:00
record+script_probe_vfs_getname.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
record+zstd_comp_decomp.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
sched.sh perf tests sched: Avoid error in cleanup on loaded machines 2026-01-23 16:58:39 -03:00
script_dlfilter.sh perf test: Use shelldir to refer perf source location 2026-01-13 17:21:39 -03:00
script_perl.sh perf test script: Add perl script testing support 2026-02-12 17:45:23 -03:00
script_python.sh perf test script: Add python script testing support 2026-02-12 17:45:23 -03:00
script.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
stat_all_metricgroups.sh perf test: Do not skip when some metric-group tests succeed 2026-01-13 17:21:56 -03:00
stat_all_metrics.sh perf test: Do not skip when some metrics tests succeeded 2026-01-13 17:21:41 -03:00
stat_all_pfm.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
stat_all_pmu.sh
stat_bpf_counters_cgrp.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
stat_bpf_counters.sh perf test: Fix perf stat --bpf-counters on hybrid machines 2026-04-01 14:50:53 -07:00
stat_metrics_cgrp.sh perf test: Add stat metrics --for-each-cgroup test 2026-05-25 16:47:14 -03:00
stat_metrics_values.sh
stat.sh perf tests: Add test for stat delay option with duration_time 2026-05-22 21:39:28 -03:00
stat+csv_output.sh perf test stat csv: Update test expectations and events 2025-11-11 16:48:36 -08:00
stat+csv_summary.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
stat+event_uniquifying.sh perf test: Avoid uncore_imc/clockticks in uniquification test 2025-09-19 16:50:21 -03:00
stat+json_output.sh perf test stat+json: Improve metric-only testing 2025-11-11 16:48:35 -08:00
stat+shadow_stat.sh perf test stat: Update shadow test to use metrics 2025-11-11 16:48:35 -08:00
stat+std_output.sh perf test stat: Update std_output testing metric expectations 2025-11-11 16:48:35 -08:00
test_arm_callgraph_fp.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
test_arm_spe_fork.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
test_arm_spe.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
test_bpf_metadata.sh perf test: Checking BPF metadata collection fails on version string 2025-09-04 16:37:19 -07:00
test_brstack.sh perf test: Fixes for check branch stack sampling 2026-04-13 23:37:59 -07:00
test_data_symbol.sh
test_event_open_fallback.sh perf test: Fix hybrid testing of event fallback test 2025-12-02 16:02:47 -08:00
test_intel_pt.sh perf test: Remove /usr/bin/cc dependency from Intel PT shell test 2026-06-04 11:41:46 -03:00
test_java_symbol.sh perf test java symbol: Additional libperf-jvmti.so path check 2026-01-06 19:06:00 -03:00
test_perf_data_converter_ctf.sh perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer 2026-06-04 17:34:52 -03:00
test_perf_data_converter_json.sh perf test: Test pipe mode with data conversion --to-json 2026-02-12 17:45:22 -03:00
test_stat_intel_tpebs.sh
test_task_analyzer.sh perf tests: Write test files to tmpdir 2026-04-01 14:50:53 -07:00
test_test_junit_output.sh perf test: Add shell test to validate JUnit XML reporting output 2026-06-04 11:41:33 -03:00
test_uprobe_from_different_cu.sh
timechart.sh perf tests timechart: Add a perf timechart test 2025-12-03 11:07:47 -08:00
top.sh perf tests top: Make the test exclusive 2025-12-23 10:13:50 -08:00
trace_btf_enum.sh perf test trace_btf_enum: Skip if permissions are insufficient 2025-09-03 12:34:54 -03:00
trace_btf_general.sh perf test: Make perf trace BTF general tests exclusive 2026-04-08 21:42:25 -07:00
trace_exit_race.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
trace_record_replay.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
trace_summary.sh perf test: Fix "trace summary" test for musl-based systems 2026-05-11 14:16:38 -03:00
trace+probe_vfs_getname.sh perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00