diff --git a/tools/perf/tests/shell/test_arm_spe.sh b/tools/perf/tests/shell/test_arm_spe.sh index b9c588ae3..962841a51 100755 --- a/tools/perf/tests/shell/test_arm_spe.sh +++ b/tools/perf/tests/shell/test_arm_spe.sh @@ -30,11 +30,13 @@ cleanup_files() trap cleanup_files exit term int arm_spe_report() { - if [ $2 != 0 ]; then + if [ $2 = 0 ]; then + echo "$1: PASS" + elif [ $2 = 2 ]; then + echo "$1: SKIPPED" + else echo "$1: FAIL" glb_err=$2 - else - echo "$1: PASS" fi } @@ -91,6 +93,11 @@ arm_spe_system_wide_test() { perf record -o ${perfdata} -e arm_spe// -a \ -- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1 + if [ $? != 0 ]; then + arm_spe_report "SPE system-wide testing" 2 + return + fi + perf_script_samples dd && perf_report_samples dd