Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ktest.pl: Fix missing "end_monitor" when machine check fails

In the "reboot" command, it does a check of the machine to see if it is
still alive with a simple "ssh echo" command. If it fails, it will assume
that a normal "ssh reboot" is not possible and force a power cycle.

In this case, the "start_monitor" is executed, but the "end_monitor" is
not, and this causes the screen will not be given back to the console. That
is, after the test, a "reset" command needs to be performed, as "echo" is
turned off.

Cc: stable@vger.kernel.org
Fixes: 6474ace999edd ("ktest.pl: Powercycle the box on reboot if no connection can be made")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

+2 -1
+2 -1
tools/testing/ktest/ktest.pl
··· 1495 1495 1496 1496 # Still need to wait for the reboot to finish 1497 1497 wait_for_monitor($time, $reboot_success_line); 1498 - 1498 + } 1499 + if ($powercycle || $time) { 1499 1500 end_monitor; 1500 1501 } 1501 1502 }