Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tests: Fix "PE file support" test build

filename__read_build_id() now takes a blocking/non-blocking argument.
The original behavior of filename__read_build_id() was blocking so add
block=true to fix the build.

Fixes: 2c369d91d093 ("perf symbol: Add blocking argument to filename__read_build_id")
Signed-off-by: James Clark <james.clark@linaro.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20250903-james-perf-read-build-id-fix-v1-1-6a694d0a980f@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

James Clark and committed by
Namhyung Kim
666d2206 01be43f2

+2 -2
+2 -2
tools/perf/tests/pe-file-parsing.c
··· 37 37 size_t idx; 38 38 39 39 scnprintf(filename, PATH_MAX, "%s/pe-file.exe", d); 40 - ret = filename__read_build_id(filename, &bid); 40 + ret = filename__read_build_id(filename, &bid, /*block=*/true); 41 41 TEST_ASSERT_VAL("Failed to read build_id", 42 42 ret == sizeof(expect_build_id)); 43 43 TEST_ASSERT_VAL("Wrong build_id", !memcmp(bid.data, expect_build_id, ··· 49 49 !strcmp(debuglink, expect_debuglink)); 50 50 51 51 scnprintf(debugfile, PATH_MAX, "%s/%s", d, debuglink); 52 - ret = filename__read_build_id(debugfile, &bid); 52 + ret = filename__read_build_id(debugfile, &bid, /*block=*/true); 53 53 TEST_ASSERT_VAL("Failed to read debug file build_id", 54 54 ret == sizeof(expect_build_id)); 55 55 TEST_ASSERT_VAL("Wrong build_id", !memcmp(bid.data, expect_build_id,