From: Ian Rogers Date: Wed, 28 May 2025 03:26:36 +0000 (-0700) Subject: perf test trace_summary: Skip --bpf-summary tests if no libbpf X-Git-Tag: ceph-for-6.17-rc6~670^2~11 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6dd7a0fde91f252858f4d4cff4245577319b7b88;p=ceph-client.git perf test trace_summary: Skip --bpf-summary tests if no libbpf 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 --- diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/shell/trace_summary.sh index 49766524dc21b..f9bb7f9388be3 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"