aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-07-14 22:33:46 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-07-14 22:33:46 +0000
commitc7e0d8c30bf2e7746708875f3a535bab72011ac6 (patch)
tree4ceb549603bc738e4210f881b504c99f29736a55 /tests
parentfee4f8c86dc91ab1861118aa2cc149d87cc4ee85 (diff)
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)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl12
1 files 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;