Commit 83244772 authored by Tommi Rantala's avatar Tommi Rantala Committed by Arnaldo Carvalho de Melo

perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support

If perf was built without trace support, the trace+probe_vfs_getname.sh
'perf test' entry fails:

  # perf trace -h
  perf: 'trace' is not a perf-command. See 'perf --help'

  # perf test 64
  64: Check open filename arg using perf trace + vfs_getname: FAILED!

Check trace support, so that we'll skip the test in that case:

  # perf test 64
  64: Check open filename arg using perf trace + vfs_getname: Skip
Signed-off-by: default avatarTommi Rantala <tommi.t.rantala@nokia.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190215134253.11454-1-tt.rantala@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 43f4e627
...@@ -4,3 +4,8 @@ skip_if_no_perf_probe() { ...@@ -4,3 +4,8 @@ skip_if_no_perf_probe() {
perf probe 2>&1 | grep -q 'is not a perf-command' && return 2 perf probe 2>&1 | grep -q 'is not a perf-command' && return 2
return 0 return 0
} }
skip_if_no_perf_trace() {
perf trace -h 2>&1 | grep -q -e 'is not a perf-command' -e 'trace command not available' && return 2
return 0
}
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
. $(dirname $0)/lib/probe.sh . $(dirname $0)/lib/probe.sh
skip_if_no_perf_probe || exit 2 skip_if_no_perf_probe || exit 2
skip_if_no_perf_trace || exit 2
. $(dirname $0)/lib/probe_vfs_getname.sh . $(dirname $0)/lib/probe_vfs_getname.sh
......
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