cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: bugs: runtests.pl can fail to detect that its test port is in use

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 20 Feb 2004 07:38:43 +0100 (CET)

On Thu, 19 Feb 2004, spage wrote:

> But runtests.pl doesn't detect the case "My test request got no output from
> a service listening on the port" , it always assumes "If I got no output,
> then the port isn't in use" and continues on to start up its own server.

Ah! You are of course so right.

Is this patch fixing the problem for you?

diff -u -r1.107 runtests.pl
--- runtests.pl 12 Feb 2004 14:40:08 -0000 1.107
+++ runtests.pl 20 Feb 2004 06:38:23 -0000
@@ -338,7 +338,7 @@
     if ( $data =~ /WE ROOLZ: (\d+)/ ) {
         $pid = 0+$1;
     }
- elsif($data) {
+ elsif($data || ($res != 7)) {
         print "RUN: Unknown HTTP server is running on port $HOSTPORT\n";
         return -2;
     }

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-02-20