1
0
Fork 0

ktest: Add timeout for ssh sync testing

commit 4d00fc477a 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: 6474ace999 ("ktest.pl: Powercycle the box on reboot if no connection can be made")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Steven Rostedt (VMware) 2020-03-09 16:00:11 -04:00 committed by Greg Kroah-Hartman
parent a67ada0dcd
commit 3625e9dfd8
1 changed files with 1 additions and 1 deletions

View File

@ -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;