aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-09-12 14:26:51 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-09-12 20:48:49 -0400
commit3ddee63a099ebbdc8f84697fe46730b58240c09d (patch)
tree44c4e15c4cc965a5f78ea1f18c0829517bd44651
parent84bde62ca4b49701190dbd953c1e04024860c1f5 (diff)
ftrace: Only disable ftrace_enabled to test buffer in selftest
The ftrace_enabled variable is set to zero in the self tests to keep delayed functions from being traced and messing with the checks. This only needs to be done when the checks are being performed, otherwise, if ftrace_enabled is off when calls back to the utility that is being tested, it can cause errors to happen and the tests can fail with false positives. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/trace/trace_selftest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 5ef60499dc8e..61a6acd6025d 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -382,6 +382,8 @@ static int trace_selftest_startup_dynamic_tracing(struct tracer *trace,
382 382
383 /* check the trace buffer */ 383 /* check the trace buffer */
384 ret = trace_test_buffer(&tr->trace_buffer, &count); 384 ret = trace_test_buffer(&tr->trace_buffer, &count);
385
386 ftrace_enabled = 1;
385 tracing_start(); 387 tracing_start();
386 388
387 /* we should only have one item */ 389 /* we should only have one item */
@@ -679,6 +681,8 @@ trace_selftest_startup_function(struct tracer *trace, struct trace_array *tr)
679 681
680 /* check the trace buffer */ 682 /* check the trace buffer */
681 ret = trace_test_buffer(&tr->trace_buffer, &count); 683 ret = trace_test_buffer(&tr->trace_buffer, &count);
684
685 ftrace_enabled = 1;
682 trace->reset(tr); 686 trace->reset(tr);
683 tracing_start(); 687 tracing_start();
684 688