[PATCH 1/6] ftrace: give time for wakeup test to run

From: Steven Rostedt
Date: Mon Sep 29 2008 - 23:07:51 EST


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@xxxxxxxxxx>
---
kernel/trace/trace_selftest.c | 3 +++
1 file changed, 3 insertions(+)

Index: linux-tip.git/kernel/trace/trace_selftest.c
===================================================================
--- linux-tip.git.orig/kernel/trace/trace_selftest.c 2008-09-29 20:13:37.000000000 -0400
+++ linux-tip.git/kernel/trace/trace_selftest.c 2008-09-29 20:14:30.000000000 -0400
@@ -498,6 +498,9 @@ trace_selftest_startup_wakeup(struct tra

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);

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/