Commit 9637bf8f authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf test: test_intel_pt.sh: Print a message when skipping kernel tracing

Messages display with the perf test -v option. Add a message to show when
skipping a test because the user cannot do kernel tracing.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20221014170905.64069-4-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5021d82b
...@@ -117,7 +117,14 @@ test_system_wide_side_band() ...@@ -117,7 +117,14 @@ test_system_wide_side_band()
can_kernel() can_kernel()
{ {
perf_record_no_decode -o "${tmpfile}" -e dummy:k true >/dev/null 2>&1 || return 2 if [ -z "${can_kernel_trace}" ] ; then
can_kernel_trace=0
perf_record_no_decode -o "${tmpfile}" -e dummy:k true >/dev/null 2>&1 && can_kernel_trace=1
fi
if [ ${can_kernel_trace} -eq 0 ] ; then
echo "SKIP: no kernel tracing"
return 2
fi
return 0 return 0
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment