Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1523282

[PATCH -tip v3 4/9] selftests: ftrace: Check whether snapshot trigger is supported correctly

From Masami Hiramatsu <mhiramat@kernel.org>
Newsgroups linux.kernel
Subject [PATCH -tip v3 4/9] selftests: ftrace: Check whether snapshot trigger is supported correctly
Date 2016-11-16 09:20 +0100
Message-ID <sE3BM-jF-17@gated-at.bofh.it> (permalink)
References <sE3BL-jF-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If "snapshot" special file doesn't exist, that kernel does
not support snapshot and snapshot trigger too. In that case
snapshot trigger test results to unsupported instead of fail.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 .../ftrace/test.d/trigger/trigger-snapshot.tc      |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc
index f84b80d..ed94f0c 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc
@@ -23,6 +23,11 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then
     exit_unsupported
 fi
 
+if [ ! -f snapshot ]; then
+    echo "snapshot is not supported"
+    exit_unsupported
+fi
+
 reset_tracer
 do_reset
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -tip v3 0/9] ftrace: selftests: Add full glob matching and update ftracetest Masami Hiramatsu <mhiramat@kernel.org> - 2016-11-16 09:20 +0100
  [PATCH -tip v3 9/9] selftests: ftrace: Add a testcase for types of kprobe event Masami Hiramatsu <mhiramat@kernel.org> - 2016-11-16 09:20 +0100
  [PATCH -tip v3 4/9] selftests: ftrace: Check whether snapshot trigger is supported correctly Masami Hiramatsu <mhiramat@kernel.org> - 2016-11-16 09:20 +0100
  [PATCH -tip v3 2/9] selftests: ftrace: Initialize ftrace before each test Masami Hiramatsu <mhiramat@kernel.org> - 2016-11-16 09:20 +0100
  [PATCH -tip v3 5/9] selftests: ftrace: Fix trigger-mod to run without syscall trace Masami Hiramatsu <mhiramat@kernel.org> - 2016-11-16 09:20 +0100
  [PATCH -tip v3 8/9] selftests: ftrace: Add a testcase for function filter glob match Masami Hiramatsu <mhiramat@kernel.org> - 2016-11-16 09:20 +0100
  [PATCH -tip v3 7/9] selftests: ftrace: Introduce TMPDIR for temporary files Masami Hiramatsu <mhiramat@kernel.org> - 2016-11-16 09:20 +0100

csiph-web