perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support
PATCH 1/1 perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support
From: Tommi Rantala <[email protected]>
If perf was built without trace support, trace+probe_vfs_getname.sh 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:
# perf test 64 64: Check open filename arg using perf trace + vfs_getname: Skip
Signed-off-by Tommi Rantala <[email protected]>
--- tools/perf/tests/shell/lib/probe.sh | 5 +++++ tools/perf/tests/shell/trace+probe_vfs_getname.sh | 1 + 2 files changed, 6 insertions(+)
tools/perf/tests/shell/lib/probe.sh +5 -0
@@ -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 +}
tools/perf/tests/shell/trace+probe_vfs_getname.sh +1 -0
@@ -12,6 +12,7 @@ . $(dirname $0)/lib/probe.sh skip_if_no_perf_probe || exit 2 +skip_if_no_perf_trace || exit 2 . $(dirname $0)/lib/probe_vfs_getname.sh
Signature · 1 line
2.20.1
Em Fri, Feb 15, 2019 at 03:42:46PM +0200, Tommi Rantala escreveu:
Quoted 8 lines
From: Tommi Rantala <[email protected]>
If perf was built without trace support,
trace+probe_vfs_getname.shfails:# perf trace -h perf: 'trace' is not a perf-command. See 'perf --help'
Quoted 7 lines
# perf test 64 64: Check open filename arg using perf trace + vfs_getname: FAILED!Check trace support, so that we'll skip the test:
# perf test 64 64: Check open filename arg using perf trace + vfs_getname: Skip
Thanks, applied.
- Arnaldo
tip-bot for Tommi Rantala
merge botperf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support
Commit-ID: 83244772a4cf9490a54182be2f65f45d6b1a1ee8 Gitweb: https://git.kernel.org/tip/83244772a4cf9490a54182be2f65f45d6b1a1ee8 Author: Tommi Rantala <[email protected]> AuthorDate: Fri, 15 Feb 2019 15:42:46 +0200 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 15 Feb 2019 13:42:26 -0300
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 <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Hendrik Brueckner <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kim Phillips <[email protected]>
Cc Michael Petlan <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/tests/shell/lib/probe.sh | 5 +++++ tools/perf/tests/shell/trace+probe_vfs_getname.sh | 1 + 2 files changed, 6 insertions(+)
tools/perf/tests/shell/lib/probe.sh +5 -0
@@ -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 +}
tools/perf/tests/shell/trace+probe_vfs_getname.sh +1 -0
@@ -12,6 +12,7 @@ . $(dirname $0)/lib/probe.sh skip_if_no_perf_probe || exit 2 +skip_if_no_perf_trace || exit 2 . $(dirname $0)/lib/probe_vfs_getname.sh