From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C36C5BA44 for ; Tue, 7 Mar 2023 17:55:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 328A1C433EF; Tue, 7 Mar 2023 17:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678211705; bh=7X6BhX2fwA+5wJpYcHMj+mH8rqrsWR9QRautTfciUiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s4RFv321CrKnREPku6ev8otJOvJa3vVA/TlCXXdidZqrHJfHRCA3B9ip5VWMjCRB7 jRF6hRJvtHNapnu5DTrrmHUnNPBVJ4YuWsjqOyL7gr3H/FTHxLTSSMk0sSMlyCE4VS x0n0V9jXpTaypIQXbB5FqMCY9MUUEzOHFo48+1dA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Steven Rostedt Subject: [PATCH 6.2 0949/1001] ktest.pl: Fix missing "end_monitor" when machine check fails Date: Tue, 7 Mar 2023 18:02:01 +0100 Message-Id: <20230307170103.323177437@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170022.094103862@linuxfoundation.org> References: <20230307170022.094103862@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Steven Rostedt commit e8bf9b98d40dbdf4e39362e3b85a70c61da68cb7 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- tools/testing/ktest/ktest.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 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; } }