]> www.infradead.org Git - users/griffoul/linux.git/commitdiff
perf tests: Fix "PE file support" test build
authorJames Clark <james.clark@linaro.org>
Wed, 3 Sep 2025 15:15:26 +0000 (16:15 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 3 Sep 2025 17:50:55 +0000 (10:50 -0700)
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>
tools/perf/tests/pe-file-parsing.c

index 30c7da79e109b480215c81c3522370ab571d6b90..8b31d1d05f905fdb41dd6778d68601e066dcfde4 100644 (file)
@@ -37,7 +37,7 @@ static int run_dir(const char *d)
        size_t idx;
 
        scnprintf(filename, PATH_MAX, "%s/pe-file.exe", d);
-       ret = filename__read_build_id(filename, &bid);
+       ret = filename__read_build_id(filename, &bid, /*block=*/true);
        TEST_ASSERT_VAL("Failed to read build_id",
                        ret == sizeof(expect_build_id));
        TEST_ASSERT_VAL("Wrong build_id", !memcmp(bid.data, expect_build_id,
@@ -49,7 +49,7 @@ static int run_dir(const char *d)
                        !strcmp(debuglink, expect_debuglink));
 
        scnprintf(debugfile, PATH_MAX, "%s/%s", d, debuglink);
-       ret = filename__read_build_id(debugfile, &bid);
+       ret = filename__read_build_id(debugfile, &bid, /*block=*/true);
        TEST_ASSERT_VAL("Failed to read debug file build_id",
                        ret == sizeof(expect_build_id));
        TEST_ASSERT_VAL("Wrong build_id", !memcmp(bid.data, expect_build_id,