Commit 25b95138 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Steven Rostedt (VMware)

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@devnote2Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 5c03d8fb
......@@ -428,7 +428,7 @@ for t in $TEST_CASES; do
exit 1
fi
done
(cd $TRACING_DIR; initialize_ftrace) # for cleanup
(cd $TRACING_DIR; finish_ftrace) # for cleanup
prlog ""
prlog "# of passed: " `echo $PASSED_CASES | wc -w`
......
......@@ -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}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment