From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 2/5] ktest: Add warning when bugs are ignored
Date: Wed, 21 Mar 2012 12:01:27 -0400 [thread overview]
Message-ID: <20120321160243.535810293@goodmis.org> (raw)
In-Reply-To: 20120321160125.496052559@goodmis.org
[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
When IGNORE_ERRORS is set, ktest will not fail a test if a backtrace
is detected. But this can be an issue if the user added it in the
config but forgot to remove it. They may be left wondering why their
test did not fail, or even worse, why their bisect gave the wrong
commit.
Add a warning in the output if IGNORE_WARNINGS is set, and ktest detects
a kernel error.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 2b63190..0a5f6cb 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1460,6 +1460,7 @@ sub get_sha1 {
sub monitor {
my $booted = 0;
my $bug = 0;
+ my $bug_ignored = 0;
my $skip_call_trace = 0;
my $loops;
@@ -1531,9 +1532,13 @@ sub monitor {
}
if ($full_line =~ /call trace:/i) {
- if (!$ignore_errors && !$bug && !$skip_call_trace) {
- $bug = 1;
- $failure_start = time;
+ if (!$bug && !$skip_call_trace) {
+ if ($ignore_errors) {
+ $bug_ignored = 1;
+ } else {
+ $bug = 1;
+ $failure_start = time;
+ }
}
}
@@ -1595,6 +1600,10 @@ sub monitor {
fail "failed - never got a boot prompt." and return 0;
}
+ if ($bug_ignored) {
+ doprint "WARNING: Call Trace detected but ignored due to IGNORE_ERRORS=1\n";
+ }
+
return 1;
}
--
1.7.8.3
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-03-21 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 16:01 [PATCH 0/5] [GIT PULL] ktest for v3.4 Steven Rostedt
2012-03-21 16:01 ` [PATCH 1/5] ktest: Add INSTALL_MOD_STRIP=1 when installing modules Steven Rostedt
2012-03-21 16:01 ` Steven Rostedt [this message]
2012-03-21 16:01 ` [PATCH 3/5] ktest: Add SCP_TO_TARGET_INSTALL option Steven Rostedt
2012-03-21 16:01 ` [PATCH 4/5] ktest: Fix SWITCH_TO_GOOD to also reboot the machine Steven Rostedt
2012-03-21 16:01 ` [PATCH 5/5] ktest: Allow a test to override REBOOT_ON_SUCCESS Steven Rostedt
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=20120321160243.535810293@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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