Skip to content

Commit 5aa60c6

Browse files
rostedtIngo Molnar
authored andcommitted
ftrace: give time for wakeup test to run
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 7c572ac commit 5aa60c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/trace/trace_selftest.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ trace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr)
498498

499499
wake_up_process(p);
500500

501+
/* give a little time to let the thread wake up */
502+
msleep(100);
503+
501504
/* stop the tracing. */
502505
tr->ctrl = 0;
503506
trace->ctrl_update(tr);

0 commit comments

Comments
 (0)