From 0893e09acd1ca194817959d3225b27595797fc5f Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Tue, 1 May 2012 08:20:12 -0400 Subject: [PATCH] --- yaml --- r: 299887 b: refs/heads/master c: 759a3cc625e77161ae457459489178dd0921524e h: refs/heads/master i: 299885: 3f5c13b4dd0605ed04bbcbeed7931315a6916cbd 299883: 3d6e204152702652cca7a48159e11693f7be7ec6 299879: bbc0e1dce277ae89c6fe3a934c5bda44f0f5fef6 299871: 283fc4a85d31956ef8a058d765769fa20a51363a v: v3 --- [refs] | 2 +- trunk/tools/testing/ktest/ktest.pl | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7362f93d6d08..b5dde4c86506 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5158ba3ea7fc8c3deafec769a32bc6eb869c3608 +refs/heads/master: 759a3cc625e77161ae457459489178dd0921524e diff --git a/trunk/tools/testing/ktest/ktest.pl b/trunk/tools/testing/ktest/ktest.pl index d2ede59b9a3c..4915408f6a98 100755 --- a/trunk/tools/testing/ktest/ktest.pl +++ b/trunk/tools/testing/ktest/ktest.pl @@ -183,6 +183,9 @@ # do not force reboots on config problems my $no_reboot = 1; +# reboot on success +my $reboot_success = 0; + my %option_map = ( "MACHINE" => \$machine, "SSH_USER" => \$ssh_user, @@ -3469,6 +3472,7 @@ sub set_test_option { # Do not reboot on failing test options $no_reboot = 1; + $reboot_success = 0; $iteration = $i; @@ -3554,9 +3558,11 @@ sub set_test_option { die "failed to checkout $checkout"; } + $no_reboot = 0; + # A test may opt to not reboot the box if ($reboot_on_success) { - $no_reboot = 0; + $reboot_success = 1; } if ($test_type eq "bisect") { @@ -3600,7 +3606,7 @@ sub set_test_option { if ($opt{"POWEROFF_ON_SUCCESS"}) { halt; -} elsif ($opt{"REBOOT_ON_SUCCESS"} && !do_not_reboot) { +} elsif ($opt{"REBOOT_ON_SUCCESS"} && !do_not_reboot && $reboot_success) { reboot_to_good; } elsif (defined($switch_to_good)) { # still need to get to the good kernel