[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230914211948.814999-6-irogers@google.com>
Date: Thu, 14 Sep 2023 14:19:48 -0700
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Nick Terrell <terrelln@...com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>, Andrii Nakryiko <andrii@...nel.org>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
James Clark <james.clark@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
Patrice Duroux <patrice.duroux@...il.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, llvm@...ts.linux.dev
Subject: [PATCH v1 5/5] 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 <irogers@...gle.com>
---
tools/perf/tests/shell/record_offcpu.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/record_offcpu.sh b/tools/perf/tests/shell/record_offcpu.sh
index a0d14cd0aa79..a1ef8f0d2b5c 100755
--- a/tools/perf/tests/shell/record_offcpu.sh
+++ b/tools/perf/tests/shell/record_offcpu.sh
@@ -28,7 +28,7 @@ test_offcpu_priv() {
err=2
return
fi
- if perf record --off-cpu -o /dev/null --quiet true 2>&1 | grep BUILD_BPF_SKEL
+ if perf version --build-options 2>&1 | grep HAVE_BPF_SKEL | grep -q OFF
then
echo "off-cpu test [Skipped missing BPF support]"
err=2
--
2.42.0.459.ge4e396fd5e-goog
Powered by blists - more mailing lists