ktest: Do not opencode reboot in grub setting
authorSteven Rostedt <srostedt@redhat.com>
Thu, 20 Oct 2011 13:56:41 +0000 (09:56 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 20 Oct 2011 13:56:41 +0000 (09:56 -0400)
When setting the next kernel to boot to with grub, do not opencode
the reboot operation.  The normal reboot operation can be modified by
config options (namely POWERCYCLE_AFTER_REBOOT). This needs to affect
all reboots. Remove the opencoded reboot to make sure that any changes
to the reboot code also affect all reboots.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl

index 1bda07f6d673176ecfdcaaea49cd923f7ea3a480..d60c496fb5144460e3f3222556c80c0696cc0247 100755 (executable)
@@ -1150,7 +1150,8 @@ sub wait_for_input
 
 sub reboot_to {
     if ($reboot_type eq "grub") {
-       run_ssh "'(echo \"savedefault --default=$grub_number --once\" | grub --batch && reboot)'";
+       run_ssh "'(echo \"savedefault --default=$grub_number --once\" | grub --batch)'";
+       reboot;
        return;
     }