From c7e0d8c30bf2e7746708875f3a535bab72011ac6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 14 Jul 2007 22:33:46 +0000 Subject: add some better logging when HTTP server start fails, and make the failure really hard if the test server can't be resolved (like for ::1 ipv6) --- tests/runtests.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index 46c082008..1224ff4df 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -529,12 +529,12 @@ sub verifyhttp { } elsif($res == 6) { # curl: (6) Couldn't resolve host '::1' - logmsg "RUN: failed to resolve host\n"; - return 0; + logmsg "RUN: failed to resolve host ($proto://$ip:$port/verifiedserver)\n"; + return -1; } elsif($data || ($res != 7)) { logmsg "RUN: Unknown server is running on port $port\n"; - return 0; + return -1; } return $pid; } @@ -631,9 +631,13 @@ sub verifyserver { $pid = &$fun($proto, $ip, $port); - if($pid) { + if($pid > 0) { last; } + elsif($pid < 0) { + # a real failure, stop trying and bail out + return 0; + } sleep(1); } return $pid; -- cgit v1.2.3