From nobody Sun Sep 14 20:20:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30685C32793 for ; Wed, 18 Jan 2023 16:43:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbjARQn5 (ORCPT ); Wed, 18 Jan 2023 11:43:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbjARQnT (ORCPT ); Wed, 18 Jan 2023 11:43:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A49AA4DBFA for ; Wed, 18 Jan 2023 08:43:06 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 43AF0618E2 for ; Wed, 18 Jan 2023 16:43:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C76FC433F1; Wed, 18 Jan 2023 16:43:04 +0000 (UTC) Date: Wed, 18 Jan 2023 11:43:01 -0500 From: Steven Rostedt To: LKML Cc: Masami Hiramatsu Subject: [PATCH] ktest.pl: Fix missing "end_monitor" when machine check fails Message-ID: <20230118114301.6b4d09cf@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Steven Rostedt 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 connect= ion can be made") Signed-off-by: Steven Rostedt --- 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 { =20 # Still need to wait for the reboot to finish wait_for_monitor($time, $reboot_success_line); - + } + if ($powercycle || $time) { end_monitor; } } --=20 2.39.0