ftrace: give time for wakeup test to run
authorSteven Rostedt <rostedt@goodmis.org>
Tue, 30 Sep 2008 03:02:37 +0000 (23:02 -0400)
committerIngo Molnar <mingo@elte.hu>
Tue, 14 Oct 2008 08:38:53 +0000 (10:38 +0200)
It is possible that the testing thread in the ftrace wakeup test does not
run before we stop the trace. This will cause the trace to fail since nothing
will be in the buffers.

This patch adds a small wait in the wakeup test to allow for the woken task
to run and be traced.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_selftest.c

index 82db910..5ebd4b1 100644 (file)
@@ -498,6 +498,9 @@ trace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr)
 
        wake_up_process(p);
 
+       /* give a little time to let the thread wake up */
+       msleep(100);
+
        /* stop the tracing. */
        tr->ctrl = 0;
        trace->ctrl_update(tr);