linux-stable/tools/perf/tests
Leo Yan 60abedb8aa perf test: Introduce script for data symbol testing
The test is designed with a data structure with 64-byte alignment, it
has two fields "data1" and "data2", and other fields are reserved.

Using the "perf mem" command, we can record and report memory samples
for a self-contained workload with 1 second duration.  If no samples are
obtained for the data structure "buf1", it reports failure;  and by
checking the offset in structure "buf1", if the memory samples aren't
for the "data1" and "data2" fields, it means wrong data symbol parsing
and returns failure.

Committer testing:

  [root@quaco ~]# grep -m1 "model name" /proc/cpuinfo
  model name	: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  [root@quaco ~]#
  [root@quaco ~]# perf test -v "data symbol"
  104: Test data symbol                                                :
  --- start ---
  test child forked, pid 192318
  Compiling test program...
  Recording workload...
  [ perf record: Woken up 2 times to write data ]
  [ perf record: Captured and wrote 0.389 MB /tmp/__perf_test.perf.data.LIuQl (5570 samples) ]
  Cleaning up files...
  test child finished with 0
  ---- end ----
  Test data symbol: Ok
  [root@quaco ~]#

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20221006101039.47870-1-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-10-06 11:12:14 -03:00
..
attr perf test: Add perf_event_attr test for Arm SPE 2022-04-28 10:40:49 -03:00
shell perf test: Introduce script for data symbol testing 2022-10-06 11:12:14 -03:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
api-io.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
attr.c perf cpumap: Give CPUs their own type 2022-01-12 14:28:23 -03:00
attr.py
backward-ring-buffer.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
bitmap.c perf cpumap: Migrate to libperf cpumap api 2022-01-22 17:08:42 -03:00
bp_account.c perf test: Fix variable length array undefined behavior in bp_account 2022-06-19 10:41:43 -03:00
bp_signal.c perf test: BP tests, remove is_supported use 2021-11-13 18:11:50 -03:00
bp_signal_overflow.c perf test: BP tests, remove is_supported use 2021-11-13 18:11:50 -03:00
bpf-script-example.c perf bpf: Convert legacy map definition to BTF-defined 2022-08-01 14:43:13 -03:00
bpf-script-test-kbuild.c
bpf-script-test-prologue.c
bpf-script-test-relocation.c
bpf.c perf test bpf: Skip test if clang is not present 2022-05-21 14:54:21 -03:00
Build perf test: Refactor shell tests allowing subdirs 2022-08-13 15:13:20 -03:00
builtin-test-list.c perf test: Refactor shell tests allowing subdirs 2022-08-13 15:13:20 -03:00
builtin-test-list.h perf test: Refactor shell tests allowing subdirs 2022-08-13 15:13:20 -03:00
builtin-test.c perf test: Refactor shell tests allowing subdirs 2022-08-13 15:13:20 -03:00
clang.c perf test: Remove skip_if_fail 2021-11-13 18:11:50 -03:00
code-reading.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
cpumap.c perf cpumap: Add range data encoding 2022-10-04 08:55:21 -03:00
demangle-java-test.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
demangle-ocaml-test.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
dlfilter-test.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
dso-data.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
dwarf-unwind.c perf unwind: Don't show unwind error messages when augmenting frame pointer stack 2022-04-09 12:34:29 -03:00
event-times.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
event_update.c perf events: Prefer union over variable length array 2022-10-04 08:55:21 -03:00
evsel-roundtrip-name.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
evsel-tp-sched.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
expand-cgroup.c perf pmu-events: Hide the pmu_events 2022-08-13 15:02:08 -03:00
expr.c perf expr: Allow a double if expression 2022-10-06 08:03:52 -03:00
fdarray.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
genelf.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
hists_common.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
hists_common.h
hists_cumulate.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
hists_filter.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
hists_link.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
hists_output.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
is_printable_array.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
keep-tracking.c perf tools: Do not pass NULL to parse_events() 2022-08-10 14:30:09 -03:00
kmod-path.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
llvm.c perf: Stop using bpf_object__open_buffer() API 2022-01-24 20:44:09 -08:00
llvm.h
make perf tools: Test build with libbpf/LIBBPF_DYNAMIC=1 2021-05-17 20:32:05 -03:00
maps.c perf test: Use pointer for maps 2022-02-14 16:51:03 -03:00
mem.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
mem2node.c perf cpumap: Migrate to libperf cpumap api 2022-01-22 17:08:42 -03:00
mmap-basic.c perf tests: Avoid pthread.h inclusion 2022-10-04 08:55:19 -03:00
mmap-thread-lookup.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
openat-syscall-all-cpus.c perf tests: Avoid pthread.h inclusion 2022-10-04 08:55:19 -03:00
openat-syscall-tp-fields.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
openat-syscall.c perf test: Use skip in openat syscall 2022-05-23 10:01:57 -03:00
parse-events.c perf test: Parse events break apart tests 2022-05-23 10:04:59 -03:00
parse-metric.c perf pmu-events: Hide the pmu_events 2022-08-13 15:02:08 -03:00
parse-no-sample-id-all.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
pe-file-parsing.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
pe-file.c perf tests: Add test for PE binary format support 2020-09-04 14:38:15 -03:00
pe-file.exe perf tests: Add test for PE binary format support 2020-09-04 14:38:15 -03:00
pe-file.exe.debug perf tests: Add test for PE binary format support 2020-09-04 14:38:15 -03:00
perf-hooks.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
perf-record.c perf tests: Avoid pthread.h inclusion 2022-10-04 08:55:19 -03:00
perf-targz-src-pkg
perf-time-to-tsc.c perf test: Fix double word in comments 2022-08-12 16:42:55 -03:00
pfm.c perf test: Remove skip_if_fail 2021-11-13 18:11:50 -03:00
pmu-events.c perf pmu-events: Hide the pmu_events 2022-08-13 15:02:08 -03:00
pmu.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
python-use.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
sample-parsing.c perf tools: Support reading PERF_FORMAT_LOST 2022-08-19 15:56:56 -03:00
sdt.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
sigtrap.c perf test: Skip sigtrap test on old kernels 2022-10-04 08:55:22 -03:00
stat.c perf cpumap: Give CPUs their own type 2022-01-12 14:28:23 -03:00
sw-clock.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
switch-tracking.c perf tools: Add evlist__add_sched_switch() 2022-10-06 08:03:53 -03:00
task-exit.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
tests.h perf test sigtrap: Add basic stress test for sigtrap handling 2021-12-07 22:18:23 -03:00
thread-map.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
thread-maps-share.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
time-utils-test.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
topology.c perf stat: Rename to aggr_cpu_id.thread_idx 2022-10-06 08:03:53 -03:00
unit_number__scnprintf.c perf test: Rename struct test to test_suite 2021-11-13 10:32:22 -03:00
vmlinux-kallsyms.c perf tests vmlinux-kallsyms: Update is_ignored_symbol function to match the kernel ignored list 2022-09-28 11:11:33 -03:00
wp.c perf test: Skip wp modify test on old kernels 2022-09-21 16:07:32 -03:00