linux/tools/perf/tests
Ian Rogers 2c369d91d0 perf symbol: Add blocking argument to filename__read_build_id
When synthesizing build-ids, for build ID mmap2 events, they will be
added for data mmaps if -d/--data is specified. The files opened for
their build IDs may block on the open causing perf to hang during
synthesis. There is some robustness in existing calls to
filename__read_build_id by checking the file path is to a regular
file, which unfortunately fails for symlinks. Rather than adding more
is_regular_file calls, switch filename__read_build_id to take a
"block" argument and specify O_NONBLOCK when this is false. The
existing is_regular_file checking callers and the event synthesis
callers are made to pass false and thereby avoiding the hang.

Fixes: 53b00ff358 ("perf record: Make --buildid-mmap the default")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250823000024.724394-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-08-25 15:07:18 -07:00
..
config-fragments
shell perf test: Ensure lock contention using pipe mode 2025-07-30 13:38:53 -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
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
demangle-java-test.c
demangle-ocaml-test.c
demangle-rust-v0-test.c
dlfilter-test.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
dso-data.c
dwarf-unwind.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
event-times.c
event_groups.c
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
expand-cgroup.c perf stat: Move metric list from config to evlist 2025-07-11 12:36:40 -07:00
expr.c
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
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
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
openat-syscall-tp-fields.c
openat-syscall.c
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
pe-file-parsing.c perf build-id: Ensure struct build_id is empty before use 2025-07-25 10:37:55 -07:00
pe-file.c
pe-file.exe
pe-file.exe.debug
perf-hooks.c
perf-record.c
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
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
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
stat.c
subcmd-help.c perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
sw-clock.c
switch-tracking.c
symbols.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
task-exit.c
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
thread-maps-share.c
time-utils-test.c
tool_pmu.c
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