Add timeout to copy_ssh and run_smoke_ssh 11/79011/10
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Thu, 7 Jul 2016 09:36:31 +0000 (11:36 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Fri, 7 Oct 2016 15:29:30 +0000 (17:29 +0200)
Change-Id: I64e6f8643cda4e89b5b35b0d472fb548ec3320c8
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tct/conf/conf.sh
tct/run/run.sh

index 0435a34..5b1ea90 100755 (executable)
@@ -61,7 +61,7 @@ copy_ssh() {
     test -n "${IP}" || die "Missing argument: ip"
     test -n "${FILE}" || die "Missing argument: file"
     COUNT=1
-    while ! sudo sshpass -p 'tizen' scp -F ${TESTLAB_SCRIPTS}/conf/ssh_config \
+    while ! sudo timeout 60 sshpass -p 'tizen' scp -F ${TESTLAB_SCRIPTS}/conf/ssh_config \
         "${FILE}" "root@${IP}:/tmp/smoke.sh"
     do
         echo "SSH connection to ${IP} failed: retrying" >&2
index bfb670d..77aa81d 100755 (executable)
@@ -81,7 +81,7 @@ run_smoke_ssh() {
     IP="$1"
     test -n "${IP}" || die "Missing argument: ip"
     COUNT=1
-    while ! sudo sshpass -p 'tizen' ssh -F ${TESTLAB_SCRIPTS}/conf/ssh_config \
+    while ! sudo timeout 60 sshpass -p 'tizen' ssh -F ${TESTLAB_SCRIPTS}/conf/ssh_config \
         "root@${IP}" sh "/tmp/smoke.sh" > sysctl.result
     do
         echo "SSH connection to ${IP} failed: retrying" >&2