aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2022-09-12 11:34:10 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-04 08:55:23 -0300
commit2c1c9e351a43878043684be92615d7002c8ea0c6 (patch)
treee9adbffc8f4f1730480829a5d9dbe18be368f71a /tools/perf/tests
parentperf test: test_intel_pt.sh: Fix return checking (diff)
downloadlinux-dev-2c1c9e351a43878043684be92615d7002c8ea0c6.tar.xz
linux-dev-2c1c9e351a43878043684be92615d7002c8ea0c6.zip
perf test: test_intel_pt.sh: Add more output in preparation for more tests
When there are more tests it won't be obvious which test failed. Add more output so that it is. 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-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rwxr-xr-xtools/perf/tests/shell/test_intel_pt.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh
index 7d2f3136ce19..2d489de9097b 100755
--- a/tools/perf/tests/shell/test_intel_pt.sh
+++ b/tools/perf/tests/shell/test_intel_pt.sh
@@ -37,12 +37,19 @@ trap trap_cleanup EXIT TERM INT
can_cpu_wide()
{
- perf record -o "${tmpfile}" -B -N --no-bpf-event -e dummy:u -C "$1" true >/dev/null 2>&1 || return 2
+ echo "Checking for CPU-wide recording on CPU $1"
+ if ! perf record -o "${tmpfile}" -B -N --no-bpf-event -e dummy:u -C "$1" true >/dev/null 2>&1 ; then
+ echo "No so skipping"
+ return 2
+ fi
+ echo OK
return 0
}
test_system_wide_side_band()
{
+ echo "--- Test system-wide sideband ---"
+
# Need CPU 0 and CPU 1
can_cpu_wide 0 || return $?
can_cpu_wide 1 || return $?
@@ -54,6 +61,7 @@ test_system_wide_side_band()
mmap_cnt=$(perf script -i "${perfdatafile}" --no-itrace --show-mmap-events -C 1 2>/dev/null | grep -c MMAP)
if [ "${mmap_cnt}" -gt 0 ] ; then
+ echo OK
return 0
fi
@@ -80,6 +88,8 @@ test_system_wide_side_band || ret=$? ; count_result $ret
cleanup
+echo "--- Done ---"
+
if [ ${err_cnt} -gt 0 ] ; then
exit 1
fi