From patchwork Wed Jan 18 21:54:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 45524 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:a405:0:0:0:0:0 with SMTP id d5csp38729wra; Wed, 18 Jan 2023 14:07:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXtiGvn3q73NOhCBSIaqLe1eVxWBOz9gvzY8v5UtZO4Nf9bKiKKQY4lCAvGWLc1du60adhak X-Received: by 2002:a05:6a20:9e4a:b0:9d:efbf:48de with SMTP id mt10-20020a056a209e4a00b0009defbf48demr7956559pzb.34.1674079670185; Wed, 18 Jan 2023 14:07:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674079670; cv=none; d=google.com; s=arc-20160816; b=HM26Pex2RlRZaTNT0TN5Xhm90nGKzmZYVf7xM10xrqzS687XyHd3rMxAeUzYbWxR8M WbFCS8uJnulSekd77RzSyJJn+dM/uvzaLRLBileTKIyu9aHOnnNfNTHRrrkpGZ4FsVY+ 1M9l3u3sBpqM7BsmOYeWedqtKI4DotjTx5aauFfQ1ABQeOA6hCELFragVJP7YJ/9b3t8 v7Sh9Jm/lFEFx3u6Bkzxg3AB+f1pN4v8lwW9LfBjRXwitcXl2w5vmpdcwZFgXE6gQRY+ eGnl4pf2s9iNhD2nzHJ/4N0fEaHPpcNFHS8V5zywmUmE//wylOBJ149J31Yp34SLtkxr cr4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=3BsWtppfmvi+kXRoZxqUBPIEYIVggMxGTPoL97i42Co=; b=r3E+k+gxnU0maCnmVvpiY5CzGaKbnuaCfAtzPPdzVJzm+BTHNbdH0R57QwonafHXaD fPR7NF5eY8IBNceTS7OmQehFGayPBMtxl/zz5pJWhg/CP206+7F5Aj+SnTSdeFabhgyC jNdcfBKVe5WbF4uxxoCMXuMCgbbCnR/fr9Rf33nCaNG7MUWw12PJRbn6dZfP1A7QG+b7 nFt/WTPGlRwGSsw7AA8aqLnd4KXz+zphnl16zLXDFM9BTfdHcTKt4hrpcsm+fZ92MfiS B8Fe0EUGldgacogUHJ7ytz3XFRaSWQ48RL88+3JkhwzronrKy95h6d1AVkQDRydWJU84 sM9Q== 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 bk13-20020a056a02028d00b004b2709233b1si32418855pgb.197.2023.01.18.14.07.34; Wed, 18 Jan 2023 14:07:50 -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 S230166AbjARWCe (ORCPT + 99 others); Wed, 18 Jan 2023 17:02:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbjARWBu (ORCPT ); Wed, 18 Jan 2023 17:01:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E41410A8F; Wed, 18 Jan 2023 14:01:48 -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 2ABEB61A73; Wed, 18 Jan 2023 22:01:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 947E7C433F2; Wed, 18 Jan 2023 22:01:47 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1pIGV8-002H9N-1U; Wed, 18 Jan 2023 17:01:46 -0500 Message-ID: <20230118220146.327085542@goodmis.org> User-Agent: quilt/0.66 Date: Wed, 18 Jan 2023 16:54:36 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: "John Warthog9 Hawley" , Masami Hiramatsu , stable@vger.kernel.org Subject: [for-linus][PATCH 1/3] ktest.pl: Fix missing "end_monitor" when machine check fails References: <20230118215435.016435760@goodmis.org> 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?1755399763939437459?= X-GMAIL-MSGID: =?utf-8?q?1755399763939437459?= 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 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 --- 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; } }