From patchwork Tue Mar 17 10:55:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 229318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 200F1C3F2CE for ; Tue, 17 Mar 2020 11:05:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD1F720658 for ; Tue, 17 Mar 2020 11:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584443117; bh=S5G1KHBEaEL4NDBxq8BafkUPfEetq4PzQnKJ/q0Y/ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WEALMUQFdtFcDIB3dhB2e2jtIIO81kpjJZutBo1vxr4c9ifK0FiXxtSclDI3Ghmst XZfjtkjEizCT/Dp2pG4FC9/zXV1gFoUExpLIuaMayNLiEHb5H4kVKvAlgoHlJWsE7a CraBp45vmLCow1KzTN/MqV/ssyKdjdaU+G89p27A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728389AbgCQLFP (ORCPT ); Tue, 17 Mar 2020 07:05:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:46016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727320AbgCQLFP (ORCPT ); Tue, 17 Mar 2020 07:05:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64D78206EC; Tue, 17 Mar 2020 11:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584443114; bh=S5G1KHBEaEL4NDBxq8BafkUPfEetq4PzQnKJ/q0Y/ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JFFigtD/ps9dZ5+wU/HCj8w9iDTm3cSl+z4dQ+JkaA8EKPvjWErLRKq0z3ABBu27l PncrKNCbPXQ2Kf71K+DSU++9MZmANwydoZVg3iptri6sg8QRbEsBVe7sfXz8JuRQ+m ChvYM2RkgaUeooht/fvw2nh43dt4Lb/Li9zj/uug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Steven Rostedt (VMware)" Subject: [PATCH 5.4 074/123] ktest: Add timeout for ssh sync testing Date: Tue, 17 Mar 2020 11:55:01 +0100 Message-Id: <20200317103315.057778302@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200317103307.343627747@linuxfoundation.org> References: <20200317103307.343627747@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Steven Rostedt (VMware) commit 4d00fc477a2ce8b6d2b09fb34ef9fe9918e7d434 upstream. Before rebooting the box, a "ssh sync" is called to the test machine to see if it is alive or not. But if the test machine is in a partial state, that ssh may never actually finish, and the ktest test hangs. Add a 10 second timeout to the sync test, which will fail after 10 seconds and then cause the test to reboot the test machine. 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 (VMware) Signed-off-by: Greg Kroah-Hartman --- tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1383,7 +1383,7 @@ sub reboot { } else { # Make sure everything has been written to disk - run_ssh("sync"); + run_ssh("sync", 10); if (defined($time)) { start_monitor;