Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ktest: Add timeout for ssh sync testing

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>

+1 -1
+1 -1
tools/testing/ktest/ktest.pl
··· 1383 1383 1384 1384 } else { 1385 1385 # Make sure everything has been written to disk 1386 - run_ssh("sync"); 1386 + run_ssh("sync", 10); 1387 1387 1388 1388 if (defined($time)) { 1389 1389 start_monitor;