[lkml]   [2020]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 5.4 074/123] ktest: Add timeout for ssh sync testing
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.

Fixes: 6474ace999edd (" 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/ | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/testing/ktest/
+++ b/tools/testing/ktest/
@@ -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)) {

 \ /
  Last update: 2020-03-17 12:05    [W:0.337 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site