Skip to content

Commit

Permalink
Merge tag 'ktest-for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/rostedt/linux-ktest

Pull two bug fixes in ktest from Steven Rostedt.

* tag 'ktest-for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Fix reboot on success stopping all reboots
  ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
  • Loading branch information
torvalds committed May 2, 2012
2 parents 208d501 + 759a3cc commit b821861
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2192,7 +2195,7 @@ sub run_bisect {
}

# Are we looking for where it worked, not failed?
if ($reverse_bisect) {
if ($reverse_bisect && $ret >= 0) {
$ret = !$ret;
}

Expand Down Expand Up @@ -3469,6 +3472,7 @@ sub set_test_option {

# Do not reboot on failing test options
$no_reboot = 1;
$reboot_success = 0;

$iteration = $i;

Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b821861

Please sign in to comment.