Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0be61ebc authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

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: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 357398e9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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 */