From: Andrew Jones <drjones@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: drjones@redhat.com, rostedt@goodmis.org
Subject: [PATCH 10/10 v2] ktest: Introduce FAILURE_LINE
Date: Fri, 12 Aug 2011 19:37:07 +0200 [thread overview]
Message-ID: <1313170627-4235-1-git-send-email-drjones@redhat.com> (raw)
In-Reply-To: <1313155932-20092-11-git-send-email-drjones@redhat.com>
This is the counterpart to SUCCESS_LINE. In some cases the boot will
succeed, but the console will display a message that means that the
boot test failed (such as a warning) while it boots. Use this option
to detect this and fail the test.
---
tools/testing/ktest/ktest.pl | 7 +++++++
tools/testing/ktest/sample.conf | 7 +++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 6ea9fc9..918fd17 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -122,6 +122,7 @@ my $booted_timeout;
my $detect_triplefault;
my $console;
my $success_line;
+my $failure_line;
my $stop_after_success;
my $stop_after_failure;
my $stop_test_after;
@@ -1015,6 +1016,11 @@ sub monitor {
# we are not guaranteed to get a full line
$full_line .= $line;
+ if (defined($failure_line) && $full_line =~ /$failure_line/) {
+ $bug = 1;
+ $failure_start = time;
+ }
+
if ($full_line =~ /$success_line/) {
$booted = 1;
$success_start = time;
@@ -2872,6 +2878,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
$console = set_test_option("CONSOLE", $i);
$detect_triplefault = set_test_option("DETECT_TRIPLE_FAULT", $i);
$success_line = set_test_option("SUCCESS_LINE", $i);
+ $failure_line = set_test_option("FAILURE_LINE", $i);
$stop_after_success = set_test_option("STOP_AFTER_SUCCESS", $i);
$stop_after_failure = set_test_option("STOP_AFTER_FAILURE", $i);
$stop_test_after = set_test_option("STOP_TEST_AFTER", $i);
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
index 99bc7d3..add9734 100644
--- a/tools/testing/ktest/sample.conf
+++ b/tools/testing/ktest/sample.conf
@@ -421,6 +421,13 @@
# (default "login:")
#SUCCESS_LINE = login:
+# Line indicating a failed boot. This is what the line contains, not
+# the entire line. If you need the entire line to match, then use
+# regular expression syntax like with SUCCESS_LINE. This is useful
+# for testing boot issues that don't stop the boot from completing.
+# (default undefined)
+#FAILURE_LINE = WARNING
+
# In case the console constantly fills the screen, having
# a specified time to stop the test after success is recommended.
# (in seconds)
--
1.7.4.1
next prev parent reply other threads:[~2011-08-12 17:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 13:32 [KTEST PATCH 00/10] collection of ktest patches Andrew Jones
2011-08-12 13:32 ` [PATCH 01/10] ktest: create outputdir, if it doesn't exist Andrew Jones
2011-08-12 13:32 ` [PATCH 02/10] ktest: small cleanup Andrew Jones
2011-08-12 13:32 ` [PATCH 03/10] ktest: factor reboot code Andrew Jones
2011-08-12 13:32 ` [PATCH 04/10] ktest: Introduce RESET_TIME Andrew Jones
2011-08-12 15:59 ` Steven Rostedt
2011-08-12 16:25 ` [PATCH 04/10 v2] ktest: Introduce CONSOLE_RESET_TIME Andrew Jones
2011-08-18 21:28 ` Steven Rostedt
2011-08-24 8:45 ` Andrew Jones
2011-08-12 13:32 ` [PATCH 05/10] ktest: refactor monitor/boot/test code Andrew Jones
2011-08-12 13:32 ` [PATCH 06/10] ktest: make start_monitor_and_boot true to its name Andrew Jones
2011-08-12 13:32 ` [PATCH 07/10] ktest: Introduce PASS_COUNT Andrew Jones
2011-08-12 16:49 ` Steven Rostedt
2011-08-12 17:09 ` Andrew Jones
2011-08-12 17:20 ` Steven Rostedt
2011-08-12 17:58 ` [PATCH 07/10 v2] ktest: Introduce RERUN Andrew Jones
2011-08-12 13:32 ` [PATCH 08/10] ktest: test faster, put REBOOT_ON_SUCCESS to more work Andrew Jones
2011-08-12 13:32 ` [PATCH 09/10] ktest: test faster, favor rsync over the tarball method Andrew Jones
2011-08-12 13:32 ` [PATCH 10/10] ktest: Introduce FAILURE_LINE Andrew Jones
2011-08-12 17:03 ` Steven Rostedt
2011-08-12 17:37 ` Andrew Jones [this message]
2011-08-12 17:44 ` [KTEST PATCH 00/10] collection of ktest patches Steven Rostedt
2011-08-12 18:03 ` Andrew Jones
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=1313170627-4235-1-git-send-email-drjones@redhat.com \
--to=drjones@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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
Powered by JetHome