aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/tests/shell/lib
diff options
context:
space:
mode:
authorMichael Petlan <[email protected]>2023-10-19 11:11:37 +0200
committerNamhyung Kim <[email protected]>2023-10-25 10:02:01 -0700
commitcbf5f58461b25f3f3e19704e2e51ad002c11080c (patch)
tree253e7400819db061b49acdefb765cb4ab5669268 /tools/perf/tests/shell/lib
parentc4a852635eddcf4130a93e687bc7b120b19fd1b7 (diff)
perf test: Skip CoreSight tests if cs_etm// event is not available
CoreSight might be not available, in such case, skip the tests. Signed-off-by: Michael Petlan <[email protected]> Reviewed-by: Leo Yan <[email protected]> Reviewed-by: Carsten Haitzler <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/tests/shell/lib')
-rw-r--r--tools/perf/tests/shell/lib/coresight.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/tests/shell/lib/coresight.sh b/tools/perf/tests/shell/lib/coresight.sh
index 6c3d34ec64d8..11ed2c25ed91 100644
--- a/tools/perf/tests/shell/lib/coresight.sh
+++ b/tools/perf/tests/shell/lib/coresight.sh
@@ -17,6 +17,8 @@ DIR="$TOOLS/$TEST"
BIN="$DIR/$TEST"
# If the test tool/binary does not exist and is executable then skip the test
if ! test -x "$BIN"; then exit 2; fi
+# If CoreSight is not available, skip the test
+perf list cs_etm | grep -q cs_etm || exit 2
DATD="."
# If the data dir env is set then make the data dir use that instead of ./
if test -n "$PERF_TEST_CORESIGHT_DATADIR"; then