mirror of
https://github.com/torvalds/linux
synced 2024-09-21 19:47:35 +00:00
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>
This commit is contained in:
parent
357398e96d
commit
0be61ebc18
|
@ -830,6 +830,8 @@ int register_tracer(struct tracer *type)
|
||||||
current_trace = saved_tracer;
|
current_trace = saved_tracer;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_CONT "FAILED!\n");
|
printk(KERN_CONT "FAILED!\n");
|
||||||
|
/* Add the warning after printing 'FAILED' */
|
||||||
|
WARN_ON(1);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/* Only reset on passing, to avoid touching corrupted buffers */
|
/* Only reset on passing, to avoid touching corrupted buffers */
|
||||||
|
|
Loading…
Reference in a new issue