From 6dd7a0fde91f252858f4d4cff4245577319b7b88 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 27 May 2025 20:26:36 -0700 Subject: [PATCH] perf test trace_summary: Skip --bpf-summary tests if no libbpf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If perf is built without libbpf (e.g. NO_LIBBPF=1) then the --bpf-summary perf trace tests will fail. Skip the tests as this is expected behavior. Signed-off-by: Ian Rogers Acked-by: Howard Chu Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andi Kleen Cc: Andreas Hindborg Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Danilo Krummrich Cc: Dmitriy Vyukov Cc: Gary Guo Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephen Brennan Cc: Trevor Gross Cc: Weilin Wang Link: https://lore.kernel.org/r/20250528032637.198960-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/shell/trace_summary.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/shell/trace_summary.sh index 49766524dc21..f9bb7f9388be 100755 --- a/tools/perf/tests/shell/trace_summary.sh +++ b/tools/perf/tests/shell/trace_summary.sh @@ -53,6 +53,12 @@ test_perf_trace "-as --summary-mode=thread --no-bpf-summary" # summary only for system wide - total summary mode test_perf_trace "-as --summary-mode=total --no-bpf-summary" +if ! perf check feature -q bpf; then + echo "Skip --bpf-summary tests as perf built without libbpf" + rm -f ${OUTPUT} + exit 2 +fi + # summary only for system wide - per-thread summary with BPF test_perf_trace "-as --summary-mode=thread --bpf-summary"