public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: "John Warthog9 Hawley" <warthog9@kernel.org>, stable@vger.kernel.org
Subject: [for-linus][PATCH 3/4] ktest: Add timeout for ssh sync testing
Date: Mon, 09 Mar 2020 16:22:34 -0400	[thread overview]
Message-ID: <20200309202451.571226644@goodmis.org> (raw)
In-Reply-To: 20200309202231.580868511@goodmis.org

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

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) <rostedt@goodmis.org>
---
 tools/testing/ktest/ktest.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 6a605ba75dd6..8bdd7253c110 100755
--- 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;
-- 
2.25.0



  parent reply	other threads:[~2020-03-09 20:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 20:22 [for-linus][PATCH 0/4] ktest: Fixes and updates for 5.6 Steven Rostedt
2020-03-09 20:22 ` [for-linus][PATCH 1/4] ktest: Fix some typos in sample.conf Steven Rostedt
2020-03-09 20:22 ` [for-linus][PATCH 2/4] ktest: Make default build option oldconfig not randconfig Steven Rostedt
2020-03-09 20:22 ` Steven Rostedt [this message]
2020-03-09 20:22 ` [for-linus][PATCH 4/4] ktest: Fix typos in ktest.pl Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200309202451.571226644@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=warthog9@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox