From 47c45c84144c52287ce1ff652f0fbc1bc7a16964 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Thu, 7 Jul 2016 11:36:31 +0200 Subject: [PATCH] Add timeout to copy_ssh and run_smoke_ssh Change-Id: I64e6f8643cda4e89b5b35b0d472fb548ec3320c8 Signed-off-by: Aleksander Mistewicz --- tct/conf/conf.sh | 2 +- tct/run/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tct/conf/conf.sh b/tct/conf/conf.sh index 0435a34..5b1ea90 100755 --- a/tct/conf/conf.sh +++ b/tct/conf/conf.sh @@ -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 diff --git a/tct/run/run.sh b/tct/run/run.sh index bfb670d..77aa81d 100755 --- a/tct/run/run.sh +++ b/tct/run/run.sh @@ -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 -- 2.7.4