aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGravatar Adrian Hunter <adrian.hunter@intel.com> 2022-09-12 11:34:09 +0300
committerGravatar Arnaldo Carvalho de Melo <acme@redhat.com> 2022-10-04 08:55:23 -0300
commitfd9b45e39cfaf885a8767bcb7631868155a2f4d6 (patch)
tree950098cc9e4c930d1d4015f4bd7ad7c0bc57e1c1 /tools
parentperf test: test_intel_pt.sh: Use quotes around variable expansion (diff)
downloadlinux-fd9b45e39cfaf885a8767bcb7631868155a2f4d6.tar.gz
linux-fd9b45e39cfaf885a8767bcb7631868155a2f4d6.tar.bz2
linux-fd9b45e39cfaf885a8767bcb7631868155a2f4d6.zip
perf test: test_intel_pt.sh: Fix return checking
The use of set -e will cause a function that returns non-zero to terminate the script unless the result is consumed by || for example. That is OK if there is only 1 test function, but not if there are more. Prepare for more by using ||. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20220912083412.7058-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/perf/tests/shell/test_intel_pt.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh
index 075b780fe9ed..7d2f3136ce19 100755
--- a/tools/perf/tests/shell/test_intel_pt.sh
+++ b/tools/perf/tests/shell/test_intel_pt.sh
@@ -72,11 +72,11 @@ count_result()
return
fi
err_cnt=$((err_cnt + 1))
+ ret=0
}
-test_system_wide_side_band
-
-count_result $?
+ret=0
+test_system_wide_side_band || ret=$? ; count_result $ret
cleanup