From: Steven Rostedt Date: Mon, 18 Jun 2012 13:28:16 +0000 (-0400) Subject: tracing/selftest: Add a WARN_ON() if a tracer test fails X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0be61ebc18b919dddbdbcd1c4f42513c310ecf59;p=linux-beck.git tracing/selftest: Add a WARN_ON() if a tracer test fails Add a WARN_ON() output on test failures so that they are easier to detect in automated tests. Although, the WARN_ON() will not print if the test causes the system to crash, obviously. Signed-off-by: Steven Rostedt --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 49249c28690d..748f6401edf6 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -830,6 +830,8 @@ int register_tracer(struct tracer *type) current_trace = saved_tracer; if (ret) { printk(KERN_CONT "FAILED!\n"); + /* Add the warning after printing 'FAILED' */ + WARN_ON(1); goto out; } /* Only reset on passing, to avoid touching corrupted buffers */