mirror-linux/tools/perf/tests
Thomas Richter 744175e972 perf test: Checking BPF metadata collection fails on version string
commit edf2cadf01 ("perf test: add test for BPF metadata collection")

fails consistently on the version string check. The perf version
string on some of the constant integration test machines contains
characters with special meaning in grep's extended regular expression
matching algorithm. The output of perf version is:

 # perf version
 perf version 6.17.0-20250814.rc1.git20.24ea63ea3877.63.fc42.s390x+git
 #

and the '+' character has special meaning in egrep command.
Also the use of egrep is deprecated.

Change the perf version string check to fixed character matching
and get rid of egrep's warning being deprecated. Use grep -F instead.

Output before:
 # perf test -F 102
 Checking BPF metadata collection
 egrep: warning: egrep is obsolescent; using grep -E
 Basic BPF metadata test [Failed invalid output]
 102: BPF metadata collection test             : FAILED!
 #

Output after:
 # perf test -F 102
 Checking BPF metadata collection
 Basic BPF metadata test [Success]
 102: BPF metadata collection test             : Ok
 #

Fixes: edf2cadf01 ("perf test: add test for BPF metadata collection")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Blake Jones <blakejones@google.com>
Link: https://lore.kernel.org/r/20250822122540.4104658-1-tmricht@linux.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-09-04 16:37:19 -07:00
..
config-fragments
shell perf test: Checking BPF metadata collection fails on version string 2025-09-04 16:37:19 -07:00
workloads perf test: Name the noploop process 2025-07-01 15:37:22 -07:00
Build perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
api-io.c
backward-ring-buffer.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
bitmap.c
bp_account.c perf tests bp_account: Fix leaked file descriptor 2025-07-11 12:05:02 -07:00
bp_signal.c
bp_signal_overflow.c
builtin-test.c perf test: In forked mode add check that fds aren't leaked 2025-07-02 19:11:13 -07:00
code-reading.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
cpumap.c perf test cpumap: Avoid use-after-free following merge 2025-01-08 17:40:05 -03:00
demangle-java-test.c perf test demangle-java: Don't segv if demangling fails 2025-05-28 10:12:47 -03:00
demangle-ocaml-test.c perf test demangle-ocaml: Switch to using dso__demangle_sym() 2025-05-09 17:03:09 -03:00
demangle-rust-v0-test.c perf test demangle-rust: Add Rust demangling test 2025-05-09 17:01:57 -03:00
dlfilter-test.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
dso-data.c perf test dso-data: Correctly free test file in read test 2025-03-17 22:07:18 -07:00
dwarf-unwind.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
event-times.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
event_groups.c perf test: Update event_groups test to use instructions 2025-01-18 10:32:57 -08:00
event_update.c libperf evsel: Rename own_cpus to pmu_cpus 2025-07-24 13:41:35 -07:00
evsel-roundtrip-name.c
evsel-tp-sched.c perf build: Include libtraceevent headers directly indicated by pkg-config 2024-11-08 22:42:57 -08:00
expand-cgroup.c perf stat: Move metric list from config to evlist 2025-07-11 12:36:40 -07:00
expr.c perf test expr: Fix system_tsc_freq for only x86 2024-12-11 09:19:44 -08:00
fdarray.c
genelf.c
hists_common.c
hists_common.h
hists_cumulate.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_filter.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_link.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_output.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hwmon_pmu.c perf hwmon_pmu: Hold path rather than fd 2025-07-02 19:05:26 -07:00
is_printable_array.c
keep-tracking.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
kmod-path.c
make perf tests make: Add NO_LIBDW=1 to minimal and add standalone test 2025-07-03 11:22:48 -07:00
maps.c
mem.c
mem2node.c
mmap-basic.c perf test: Expand user space event reading (rdpmc) tests 2025-06-20 13:14:07 -07:00
mmap-thread-lookup.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
openat-syscall-all-cpus.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
openat-syscall-tp-fields.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
openat-syscall.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
parse-events.c perf parse-events: Fix missing slots for Intel topdown metric events 2025-07-24 13:41:35 -07:00
parse-metric.c perf stat: Move metric list from config to evlist 2025-07-11 12:36:40 -07:00
parse-no-sample-id-all.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
pe-file-parsing.c perf tests: Fix "PE file support" test build 2025-09-03 10:50:55 -07:00
pe-file.c
pe-file.exe
pe-file.exe.debug
perf-hooks.c
perf-record.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
perf-targz-src-pkg perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
perf-time-to-tsc.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
pfm.c
pmu-events.c perf jevents: If the long_desc and desc are identical then drop the long_desc 2025-07-11 12:36:40 -07:00
pmu.c perf pmu: Rename name matching for no suffix or wildcard variants 2025-02-04 21:28:46 -08:00
python-use.c
sample-parsing.c perf test: Move PERF_SAMPLE_WEIGHT_STRUCT parsing to common test 2025-07-25 10:37:58 -07:00
sdt.c perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
sigtrap.c perf btf: Make the sigtrap test helper to find a member by name widely available 2024-12-09 17:52:41 -03:00
stat.c perf stat: Move stat_config into config.c 2024-12-18 16:24:32 -03:00
subcmd-help.c perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
sw-clock.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
switch-tracking.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
symbols.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
task-exit.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
tests-scripts.c perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
tests-scripts.h
tests.h perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
thread-map.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
thread-maps-share.c
time-utils-test.c
tool_pmu.c perf tests: Fix Tool PMU test segfault 2025-02-12 19:34:56 -08:00
topology.c perf evlist: Change env variable to session 2025-07-25 10:37:56 -07:00
unit_number__scnprintf.c
util.c perf util: add a basic SHA-1 implementation 2025-06-26 10:51:40 -07:00
vmlinux-kallsyms.c
wp.c