From: Andrew Jones <drjones@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: drjones@redhat.com, rostedt@goodmis.org
Subject: [PATCH 08/10] ktest: test faster, put REBOOT_ON_SUCCESS to more work
Date: Fri, 12 Aug 2011 15:32:10 +0200 [thread overview]
Message-ID: <1313155932-20092-9-git-send-email-drjones@redhat.com> (raw)
In-Reply-To: <1313155932-20092-1-git-send-email-drjones@redhat.com>
Allow the user to decide if it's necessary to reboot after each
successful test or not. If a successfully booted target supports
installation of another kernel, then we might as well save the
time to reboot (which may be long on some systems) to a known-good
kernel. We already have REBOOT_ON_SUCCESS, which defaults to true,
and was underutilized. It only controlled the rebooting of the
target after all testing completed successfully. Now, if the user
sets this to false, we assume that rebooting isn't necessary at
any stage of the testing, assuming the tests are successful. The
option is now also a per-test config option, so the top-level,
default behavior may remain the same.
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
tools/testing/ktest/ktest.pl | 8 +++++---
tools/testing/ktest/sample.conf | 1 -
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 38c4532..719df19 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -74,6 +74,7 @@ my $reboot_script;
my $power_cycle;
my $reboot;
my $reboot_on_error;
+my $reboot_on_success;
my $poweroff_on_error;
my $die_on_failure;
my $powercycle_after_reboot;
@@ -1383,7 +1384,7 @@ sub success {
doprint "*******************************************\n";
doprint "*******************************************\n";
- if ($i != $opt{"NUM_TESTS"} && !do_not_reboot) {
+ if ($i != $opt{"NUM_TESTS"} && !do_not_reboot && $reboot_on_success) {
doprint "Reboot and wait $sleep_time seconds\n";
reboot $sleep_time;
}
@@ -1585,7 +1586,7 @@ sub run_bisect_test {
# reboot the box to a kernel we can ssh to
if ($type ne "build") {
- bisect_reboot;
+ bisect_reboot if ($result == 0 || $reboot_on_success);
}
$in_bisect = 0;
@@ -2191,7 +2192,7 @@ sub patchcheck {
do_test($type) or return 0;
- patchcheck_reboot;
+ patchcheck_reboot if ($reboot_on_success);
}
$in_patchcheck = 0;
success $i;
@@ -2834,6 +2835,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
$post_install = set_test_option("POST_INSTALL", $i);
$reboot_script = set_test_option("REBOOT_SCRIPT", $i);
$reboot_on_error = set_test_option("REBOOT_ON_ERROR", $i);
+ $reboot_on_success = set_test_option("REBOOT_ON_SUCCESS", $i);
$poweroff_on_error = set_test_option("POWEROFF_ON_ERROR", $i);
$die_on_failure = set_test_option("DIE_ON_FAILURE", $i);
$power_off = set_test_option("POWER_OFF", $i);
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
index fe7630a..36521c8 100644
--- a/tools/testing/ktest/sample.conf
+++ b/tools/testing/ktest/sample.conf
@@ -11,7 +11,6 @@
# LOG_FILE
# CLEAR_LOG
# POWEROFF_ON_SUCCESS
-# REBOOT_ON_SUCCESS
#
# Test specific options are set after the label:
#
--
1.7.4.1
next prev parent reply other threads:[~2011-08-12 13:32 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 ` Andrew Jones [this message]
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 ` [PATCH 10/10 v2] " Andrew Jones
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=1313155932-20092-9-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