perf test: Skip CoreSight tests if cs_etm// event is not available
PATCH 1/1 perf test: Skip CoreSight tests if cs_etm// event is not available
CoreSight might be not available, in such case, skip the tests.
--- tools/perf/tests/shell/lib/coresight.sh | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/tests/shell/lib/coresight.sh +2 -0
@@ -10,20 +10,22 @@ # perf record options for the perf tests to use PERFRECMEM="-m ,16M" PERFRECOPT="$PERFRECMEM -e cs_etm//u" TOOLS=$(dirname $0) 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 DATD="$PERF_TEST_CORESIGHT_DATADIR"; fi # If the stat dir env is set then make the data dir use that instead of ./ STATD="." if test -n "$PERF_TEST_CORESIGHT_STATDIR"; then STATD="$PERF_TEST_CORESIGHT_STATDIR"; fi
Signature · 1 line
2.18.4
Quoted 14 lines · Michael Petlan
CoreSight might be not available, in such case, skip the tests.
Signed-off-by Michael Petlan <[email protected]>--- tools/perf/tests/shell/lib/coresight.sh | 2 ++ 1 file changed, 2 insertions(+)tools/perf/tests/shell/lib/coresight.sh +0
-0@@ -10,20 +10,22 @@ # perf record options for the perf tests to use
tools/perf/tests/shell/lib/coresight.sh line 21
Quoted 10 lines
tools/perf/tests/shell/lib/coresight.sh +2
-0PERFRECMEM="-m ,16M" PERFRECOPT="$PERFRECMEM -e cs_etm//u" TOOLS=$(dirname $0) 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
Carsten Haitzler
Reviewed-byQuoted 18 lines · Leo Yan
Quoted 17 lines · Michael Petlan
CoreSight might be not available, in such case, skip the tests.
Signed-off-by Michael Petlan <[email protected]>--- tools/perf/tests/shell/lib/coresight.sh | 2 ++ 1 file changed, 2 insertions(+)tools/perf/tests/shell/lib/coresight.sh +0
-0@@ -10,20 +10,22 @@ # perf record options for the perf tests to use PERFRECMEM="-m ,16M" PERFRECOPT="$PERFRECMEM -e cs_etm//u"
Quoted 8 lines
tools/perf/tests/shell/lib/coresight.sh line 21
Quoted 7 lines
tools/perf/tests/shell/lib/coresight.sh +2
-0TOOLS=$(dirname $0) 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 2Reviewed-by Leo Yan <[email protected]>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Quoted 3 lines · Michael Petlan
CoreSight might be not available, in such case, skip the tests.
Applied to perf-tools-next, thanks!