From: Linda Wang Date: Sat, 29 Jul 2017 03:37:46 +0000 (+0000) Subject: Restrict ping only once in ping.sh X-Git-Tag: opnfv-5.0.RC1~222^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F38375%2F2;p=functest.git Restrict ping only once in ping.sh Otherwise, it makes no sense to configure ping_timeout as 200 times. Change-Id: I6e15f5149f24a4316f6d5b70bcda9a46418d1522 Signed-off-by: Linda Wang --- diff --git a/functest/opnfv_tests/openstack/vping/ping.sh b/functest/opnfv_tests/openstack/vping/ping.sh index 693b86825..15f5e84e1 100644 --- a/functest/opnfv_tests/openstack/vping/ping.sh +++ b/functest/opnfv_tests/openstack/vping/ping.sh @@ -1,13 +1,10 @@ #!/bin/sh -while true; do - ping -c 1 $1 2>&1 >/dev/null - RES=$? - if [ "Z$RES" = "Z0" ] ; then - echo 'vPing OK' - break - else - echo 'vPing KO' - fi - sleep 1 -done \ No newline at end of file + +ping -c 1 $1 2>&1 >/dev/null +RES=$? +if [ "Z$RES" = "Z0" ] ; then + echo 'vPing OK' +else + echo 'vPing KO' +fi