diff options
author | Tommi Rantala <tommi.t.rantala@nokia.com> | 2019-02-15 14:42:46 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-02-15 17:42:26 +0100 |
commit | 83244772a4cf9490a54182be2f65f45d6b1a1ee8 (patch) | |
tree | c684025d11c87ef533471d7cda989dcb8ac9c34f /tools/perf/tests/shell/lib | |
parent | Merge tag 'perf-core-for-mingo-5.1-20190214' of git://git.kernel.org/pub/scm/... (diff) | |
download | linux-83244772a4cf9490a54182be2f65f45d6b1a1ee8.tar.xz linux-83244772a4cf9490a54182be2f65f45d6b1a1ee8.zip |
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: Tommi 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/shell/lib')
-rw-r--r-- | tools/perf/tests/shell/lib/probe.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/tests/shell/lib/probe.sh b/tools/perf/tests/shell/lib/probe.sh index 6293cc660947..e37787be672b 100644 --- a/tools/perf/tests/shell/lib/probe.sh +++ b/tools/perf/tests/shell/lib/probe.sh @@ -4,3 +4,8 @@ skip_if_no_perf_probe() { perf probe 2>&1 | grep -q 'is not a perf-command' && return 2 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 +} |