From 4d94aa07beb25637da564e7303f28f67b240630d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 2 Oct 2020 17:23:27 +0200 Subject: tests: prolong timeout in wait_for_port gnutls-serv invocations in cert-tests/dsa can take long time to launch if valgrind tests are enabled. Signed-off-by: Daiki Ueno --- tests/scripts/common.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh index 61b2cfa9d8..30afae3460 100644 --- a/tests/scripts/common.sh +++ b/tests/scripts/common.sh @@ -150,16 +150,17 @@ wait_for_port() local PORT="$1" sleep 1 - for i in 1 2 3 4 5 6;do + local i=0 + while test $i -lt 90; do check_if_port_listening ${PORT} ret=$? - if test $ret != 0;then - check_if_port_in_use ${PORT} - echo "try $i: waiting for port" - sleep 2 - else + if test $ret = 0;then break fi + i=`expr $i + 1` + check_if_port_in_use ${PORT} + echo "try $i: waiting for port" + sleep 2 done return $ret } -- cgit v1.2.1