From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 1/4] tracing/selftest: Add a WARN_ON() if a tracer test fails
Date: Thu, 28 Jun 2012 19:16:26 -0400 [thread overview]
Message-ID: <20120628231806.746912769@goodmis.org> (raw)
In-Reply-To: 20120628231625.869980334@goodmis.org
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
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>
---
kernel/trace/trace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 49249c2..748f640 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 */
--
1.7.10
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-06-28 23:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 23:16 [PATCH 0/4] [GIT PULL][v3.6] tracing: updates Steven Rostedt
2012-06-28 23:16 ` Steven Rostedt [this message]
2012-06-28 23:16 ` [PATCH 2/4] tracing/kvm: Use __print_hex() for kvm_emulate_insn tracepoint Steven Rostedt
2012-06-28 23:16 ` [PATCH 3/4] tracing: Remove NR_CPUS array from trace_iterator Steven Rostedt
2012-06-28 23:16 ` [PATCH 4/4] ring-buffer: Fix uninitialized read_stamp Steven Rostedt
2012-07-02 16:16 ` Steven Rostedt
2012-07-06 9:11 ` Ingo Molnar
2012-07-06 9:14 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120628231806.746912769@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox