Skip to content

Commit b4f48f3

Browse files
captain5050namhyung
authored andcommitted
perf test: Detect off-cpu support from build options
Use perf version to detect whether BPF skeletons were enabled in a build rather than a failing perf record. Signed-off-by: Ian Rogers <[email protected]> Tested-by: Namhyung Kim <[email protected]> Cc: James Clark <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Nick Terrell <[email protected]> Cc: Patrice Duroux <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Tiezhu Yang <[email protected]> Cc: Tom Rix <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent c2ac838 commit b4f48f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/tests/shell/record_offcpu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test_offcpu_priv() {
2828
err=2
2929
return
3030
fi
31-
if perf record --off-cpu -o /dev/null --quiet true 2>&1 | grep BUILD_BPF_SKEL
31+
if perf version --build-options 2>&1 | grep HAVE_BPF_SKEL | grep -q OFF
3232
then
3333
echo "off-cpu test [Skipped missing BPF support]"
3434
err=2

0 commit comments

Comments
 (0)