All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support
@ 2019-02-15 13:42 Tommi Rantala
  2019-02-15 16:43 ` Arnaldo Carvalho de Melo
  2019-02-28  7:37 ` [tip:perf/core] " tip-bot for Tommi Rantala
  0 siblings, 2 replies; 3+ messages in thread
From: Tommi Rantala @ 2019-02-15 13:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tommi Rantala, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, Hendrik Brueckner, Michael Petlan, Kim Phillips

From: Tommi Rantala <tommi.t.rantala@nokia.com>

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 <tommi.t.rantala@nokia.com>
---
 tools/perf/tests/shell/lib/probe.sh               | 5 +++++
 tools/perf/tests/shell/trace+probe_vfs_getname.sh | 1 +
 2 files changed, 6 insertions(+)

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
+}
diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
index 50109f27ca07..147efeb6b195 100755
--- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
@@ -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
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-28  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15 13:42 [PATCH] perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support Tommi Rantala
2019-02-15 16:43 ` Arnaldo Carvalho de Melo
2019-02-28  7:37 ` [tip:perf/core] " tip-bot for Tommi Rantala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.