浏览代码

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>
Masami Hiramatsu 8 年之前
父节点
当前提交
131c60c39c
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc

+ 5 - 0
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