mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ktest.pl: Fix missing "end_monitor" when machine check fails
@ 2023-01-18 16:43 Steven Rostedt
  2023-01-18 16:43 ` Steven Rostedt
  2023-01-18 16:45 ` Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2023-01-18 16:43 UTC (permalink / raw)
  To: LKML; +Cc: Masami Hiramatsu

From: Steven Rostedt <rostedt@goodmis.org>

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 not to be given back to the console. That
is, after the test, a "reset" command needs to be performed, as "echo" is
turned off.

Fixes: 6474ace999edd ("ktest.pl: Powercycle the box on reboot if no connection can be made")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 tools/testing/ktest/ktest.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 6f9fff88cedf..f2f48ce6ac4d 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1499,7 +1499,8 @@ sub reboot {
 
 	# Still need to wait for the reboot to finish
 	wait_for_monitor($time, $reboot_success_line);
-
+    }
+    if ($powercycle || $time) {
 	end_monitor;
     }
 }
-- 
2.39.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-18 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 16:43 [PATCH] ktest.pl: Fix missing "end_monitor" when machine check fails Steven Rostedt
2023-01-18 16:43 ` Steven Rostedt
2023-01-18 16:45 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®