aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-10-27 08:22:11 +0900
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-10-26 20:27:19 -0400
commit25b95138728028dd0f576d9f252bc8f0b6c609fa (patch)
treeb2a144456d52fb29e139df16c56470f606b46304 /tools/testing/selftests/ftrace/test.d
parentMAINTAINERS: Update KPROBES and TRACING entries (diff)
downloadlinux-dev-25b95138728028dd0f576d9f252bc8f0b6c609fa.tar.xz
linux-dev-25b95138728028dd0f576d9f252bc8f0b6c609fa.zip
selftests/ftrace: Stop tracing while reading the trace file by default
Stop tracing while reading the trace file by default, to prevent the test results while checking it and to avoid taking a long time to check the result. If there is any testcase which wants to test the tracing while reading the trace file, please override this setting inside the test case. This also recovers the pause-on-trace when clean it up. Link: https://lkml.kernel.org/r/163529053143.690749.15365238954175942026.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d')
-rw-r--r--tools/testing/selftests/ftrace/test.d/functions12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index 000fd05e84b1..5f6cbec847fc 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -124,10 +124,22 @@ initialize_ftrace() { # Reset ftrace to initial-state
[ -f uprobe_events ] && echo > uprobe_events
[ -f synthetic_events ] && echo > synthetic_events
[ -f snapshot ] && echo 0 > snapshot
+
+# Stop tracing while reading the trace file by default, to prevent
+# the test results while checking it and to avoid taking a long time
+# to check the result.
+ [ -f options/pause-on-trace ] && echo 1 > options/pause-on-trace
+
clear_trace
enable_tracing
}
+finish_ftrace() {
+ initialize_ftrace
+# And recover it to default.
+ [ -f options/pause-on-trace ] && echo 0 > options/pause-on-trace
+}
+
check_requires() { # Check required files and tracers
for i in "$@" ; do
r=${i%:README}