diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-12-23 00:24:51 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-01-04 21:47:16 -0500 |
commit | 96f6a0df19238fceed77ddfc33bb2d6a4e1b9be6 (patch) | |
tree | 17b07fcf8ce8ec8a4ceedcf52e5aa21395c251f1 /tools/testing | |
parent | c2857cb4a855aba0c3f826bcd0dfef72abb0995b (diff) |
ktest: Still do reboot even for REBOOT_TYPE = script
The REBOOT_TYPE may be either grub or script, if it is script
it is expected that a REBOOT_SCRIPT is defined.
With the SWITCH_TO_TEST which is the complement of SWITCH_TO_GOOD,
which does basically the same thing as REBOOT_SCRIPT and but for
both grub and script, the REBOOT_SCRIPT does not need to be mandatory
anymore.
Do not require the REBOOT_SCRIPT and always run the reboot code
for both grub and script.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 11 | ||||
-rw-r--r-- | tools/testing/ktest/sample.conf | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index f360cbdbf00f..f81c8b3a39a8 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -485,8 +485,6 @@ sub get_ktest_configs { | |||
485 | 485 | ||
486 | if ($rtype eq "grub") { | 486 | if ($rtype eq "grub") { |
487 | get_ktest_config("GRUB_MENU"); | 487 | get_ktest_config("GRUB_MENU"); |
488 | } else { | ||
489 | get_ktest_config("REBOOT_SCRIPT"); | ||
490 | } | 488 | } |
491 | } | 489 | } |
492 | 490 | ||
@@ -1430,11 +1428,10 @@ sub reboot_to { | |||
1430 | 1428 | ||
1431 | if ($reboot_type eq "grub") { | 1429 | if ($reboot_type eq "grub") { |
1432 | run_ssh "'(echo \"savedefault --default=$grub_number --once\" | grub --batch)'"; | 1430 | run_ssh "'(echo \"savedefault --default=$grub_number --once\" | grub --batch)'"; |
1433 | reboot; | 1431 | } elsif (defined $reboot_script) { |
1434 | return; | 1432 | run_command "$reboot_script"; |
1435 | } | 1433 | } |
1436 | 1434 | reboot; | |
1437 | run_command "$reboot_script"; | ||
1438 | } | 1435 | } |
1439 | 1436 | ||
1440 | sub get_sha1 { | 1437 | sub get_sha1 { |
@@ -3479,8 +3476,6 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
3479 | $target = "$ssh_user\@$machine"; | 3476 | $target = "$ssh_user\@$machine"; |
3480 | if ($reboot_type eq "grub") { | 3477 | if ($reboot_type eq "grub") { |
3481 | dodie "GRUB_MENU not defined" if (!defined($grub_menu)); | 3478 | dodie "GRUB_MENU not defined" if (!defined($grub_menu)); |
3482 | } elsif (!defined($reboot_script)) { | ||
3483 | dodie "REBOOT_SCRIPT not defined" | ||
3484 | } | 3479 | } |
3485 | } | 3480 | } |
3486 | 3481 | ||
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index 86ce62c3fdca..d7148f7c7c04 100644 --- a/tools/testing/ktest/sample.conf +++ b/tools/testing/ktest/sample.conf | |||
@@ -346,7 +346,10 @@ | |||
346 | #GRUB_MENU = Test Kernel | 346 | #GRUB_MENU = Test Kernel |
347 | 347 | ||
348 | # A script to reboot the target into the test kernel | 348 | # A script to reboot the target into the test kernel |
349 | # (Only mandatory if REBOOT_TYPE = script) | 349 | # This and SWITCH_TO_TEST are about the same, except |
350 | # SWITCH_TO_TEST is run even for REBOOT_TYPE = grub. | ||
351 | # This may be left undefined. | ||
352 | # (default undefined) | ||
350 | #REBOOT_SCRIPT = | 353 | #REBOOT_SCRIPT = |
351 | 354 | ||
352 | #### Optional Config Options (all have defaults) #### | 355 | #### Optional Config Options (all have defaults) #### |