Skip to content

Commit

Permalink
perf test: test_intel_pt.sh: Print a message when skipping kernel tra…
Browse files Browse the repository at this point in the history
…cing

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: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Arnaldo 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
ahunter6 authored and acmel committed Oct 15, 2022
1 parent 5021d82 commit 9637bf8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/perf/tests/shell/test_intel_pt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ test_system_wide_side_band()

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
}

Expand Down

0 comments on commit 9637bf8

Please sign in to comment.