From patchwork Wed Jan 18 16:43:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 45386 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2442812wrn; Wed, 18 Jan 2023 08:49:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXtQ22w2vuVKT/gIOUxNZEAyXk01Wzot+EsdwyN1C+Jyz8OxqsjGIB/v3M0sp8MvQqxBXH87 X-Received: by 2002:a17:902:bd95:b0:194:6d3b:3a68 with SMTP id q21-20020a170902bd9500b001946d3b3a68mr7921633pls.5.1674060594223; Wed, 18 Jan 2023 08:49:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674060594; cv=none; d=google.com; s=arc-20160816; b=mulqLutlqOkrrFM6VzXlnY0fuo0u0sC02FsCWoouPmX1XDgPwo4hCJoeJV4j8jjkD3 mx/V7TkUgjD+7bR+/diXwHbMb6yKF8mAHipnk9Qvctl4cwUyY8UF8ypz2RFMIpSNCSzc YxgkL01vZJkt0memxjEvUd+UqvQsy9N8nQuEKDyFNh8Yl6dhiexC4e6JLsUrKUXheMrC h4QoML2lxkzxZ0mwQigRPQ8G/sJkEpN+8afjdr/lM1brW/Tqpsb2sRbRL0Eu+C0wr+6w l8x3RoI86LRPmIfXqYSu9jyKEBkRoNabbN1wy2mR1oiaNq1opwiVnky4y+ntGifo9FbP ObGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date; bh=P1ce4xmadZ2zuAtOCp38DhXS3idpYLbchLnqSpYlf9o=; b=a13u9sH17dG8MPFb4n/HJMvQkm/kovO9lBqN2aFQgrJOn+t1HeBnSbeMy5pP+Vw/8K +tQwuoOnolQ48aHNRPN9Avncre3H4yfoveT/DYLPh+eyS7J7HBy3M9QCEVOAs9NWrjZD Fb8kD/GweJ7JNJh47s/yL8m0UjvUi8oVifA+4w5Q5gCmWgu2vJv5l/j0fj8fUOi7KsXr E4Z+A3u9MEKnCFkYzqtshul0MpO+eZ2474pHgni8G+bWZeiff61taYhNChapY0ede+rn mM+VLZjbwQh2aCWr76lr1OnE3+wTFwtTAEgHWsbxcEK5o72fdQ/wlRpAbqfIuJ+hDwZD 6shA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a170902778900b00194516b2d94si11477600pll.531.2023.01.18.08.49.41; Wed, 18 Jan 2023 08:49:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbjARQn5 (ORCPT + 99 others); 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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755379755520209569?= X-GMAIL-MSGID: =?utf-8?q?1755379761605959796?= 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 connection 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 { # Still need to wait for the reboot to finish wait_for_monitor($time, $reboot_success_line); - + } + if ($powercycle || $time) { end_monitor; } }