summaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2023-01-18 17:31:25 +0100
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-02-20 17:52:27 +0100
commite8bf9b98d40dbdf4e39362e3b85a70c61da68cb7 (patch)
tree6d1c59e544c7b0a09dd7d88af0b10d3aa1d23de4 /tools/testing/ktest
parentktest.pl: Add shell commands to variables (diff)
downloadlinux-e8bf9b98d40dbdf4e39362e3b85a70c61da68cb7.tar.xz
linux-e8bf9b98d40dbdf4e39362e3b85a70c61da68cb7.zip
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>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-xtools/testing/ktest/ktest.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index ac59999ed3de..62823a4232ab 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1495,7 +1495,8 @@ sub reboot {
# Still need to wait for the reboot to finish
wait_for_monitor($time, $reboot_success_line);
-
+ }
+ if ($powercycle || $time) {
end_monitor;
}
}