Skip to content

Commit

Permalink
ftrace: give time for wakeup test to run
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Oct 14, 2008
1 parent 7c572ac commit 5aa60c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/trace/trace_selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5aa60c6

Please sign in to comment.