diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-06-18 09:28:16 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-06-28 13:52:14 -0400 |
commit | 0be61ebc18b919dddbdbcd1c4f42513c310ecf59 (patch) | |
tree | 60a26df229aa1187f1c75871431ef9a92c255a75 /kernel/trace/trace.c | |
parent | 357398e96d8c883b010379a7669df43ed0e2e32b (diff) |
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 <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
830 | current_trace = saved_tracer; | 830 | current_trace = saved_tracer; |
831 | if (ret) { | 831 | if (ret) { |
832 | printk(KERN_CONT "FAILED!\n"); | 832 | printk(KERN_CONT "FAILED!\n"); |
833 | /* Add the warning after printing 'FAILED' */ | ||
834 | WARN_ON(1); | ||
833 | goto out; | 835 | goto out; |
834 | } | 836 | } |
835 | /* Only reset on passing, to avoid touching corrupted buffers */ | 837 | /* Only reset on passing, to avoid touching corrupted buffers */ |