summaryrefslogtreecommitdiff
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2016-11-16 11:13:32 +0300
committerSteven Rostedt <rostedt@goodmis.org>2016-11-22 22:24:14 +0300
commit131c60c39cf05287b07025b5eefac7bc10c086b0 (patch)
tree107def1cf1ae57dac86ebd496eca84a480be6f01 /tools/testing/selftests
parent7786bcca77756b657c28ca7e38600333f5197f9b (diff)
downloadlinux-131c60c39cf05287b07025b5eefac7bc10c086b0.tar.xz
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/selftests')
-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