aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/ftracetest
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2016-11-16 17:13:02 +0900
committerSteven Rostedt <rostedt@goodmis.org>2016-11-22 13:30:58 -0500
commit131f840d5b7c73cdb928c4dc7afd5120b0154d34 (patch)
treec3bd0ce7f48bd1d8acbdafb37a4fdd95cac16065 /tools/testing/selftests/ftrace/ftracetest
parenttracing: Add new trace_marker_raw (diff)
downloadlinux-dev-131f840d5b7c73cdb928c4dc7afd5120b0154d34.tar.xz
linux-dev-131f840d5b7c73cdb928c4dc7afd5120b0154d34.zip
selftests: ftrace: Initialize ftrace before each test
Reset ftrace to initial state before running each test. This fixes some test cases to enable tracing before starting trace test. This can avoid false-positive failure when previous testcase fails while disabling tracing. Link: http://lkml.kernel.org/r/147928398192.22982.7767460638302113002.stgit@devbox Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/ftrace/ftracetest2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index 4c6a0bf8ba79..a03d366a4a2f 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -228,7 +228,7 @@ trap 'SIG_RESULT=$XFAIL' $SIG_XFAIL
__run_test() { # testfile
# setup PID and PPID, $$ is not updated.
- (cd $TRACING_DIR; read PID _ < /proc/self/stat ; set -e; set -x; . $1)
+ (cd $TRACING_DIR; read PID _ < /proc/self/stat; set -e; set -x; initialize_ftrace; . $1)
[ $? -ne 0 ] && kill -s $SIG_FAIL $SIG_PID
}