From: Masami Hiramatsu Date: Wed, 16 Nov 2016 08:13:32 +0000 (+0900) Subject: selftests: ftrace: Check whether snapshot trigger is supported correctly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=131c60c39cf05287b07025b5eefac7bc10c086b0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Steven Rostedt --- 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