summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2016-11-16 09:13:32 +0100
committerSteven Rostedt <rostedt@goodmis.org>2016-11-22 20:24:14 +0100
commit131c60c39cf05287b07025b5eefac7bc10c086b0 (patch)
tree107def1cf1ae57dac86ebd496eca84a480be6f01 /tools/testing
parentselftests: ftrace: Add --quiet option not to show error logs on screen (diff)
downloadlinux-131c60c39cf05287b07025b5eefac7bc10c086b0.tar.xz
linux-131c60c39cf05287b07025b5eefac7bc10c086b0.zip
selftests: ftrace: Check whether snapshot trigger is supported correctly
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. Link: http://lkml.kernel.org/r/147928401215.22982.10411665829041109794.stgit@devbox Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc5
1 files changed, 5 insertions, 0 deletions
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 f84b80d551a2..ed94f0c4e0e4 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