cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Multiple `make check' failures of curl-7.18.X

From: Andy Tsouladze <andycurl_at_andy-t.org>
Date: Sun, 17 Aug 2008 10:59:34 -0500 (CDT)

> Finally, below is a cumulative patch, against runtest.pl as it is shipped
> with curl-7.18.2:
>
> ----------------------------------------------------------------
> andyt_at_mate: tests> diff -u runtests.pl.orig runtests.pl
> --- runtests.pl.orig 2008-08-11 23:32:57.702335761 -0500
> +++ runtests.pl 2008-08-17 00:09:12.806834418 -0500
> @@ -387,7 +387,7 @@
> my @paths=(split(":", $ENV{'PATH'}), "/usr/sbin", "/usr/local/sbin",
> "/sbin", "/usr/bin", "/usr/local/bin" );
> for(@paths) {
> - if( -x "$_/$cmd") {
> + if( -x "$_/$cmd" && ! -d "$_/$cmd") {
> return "$_/$cmd";
> }
> }
> @@ -1856,6 +1856,8 @@
>
> if(!$short) {
> printf "test %03d SKIPPED: $why\n", $testnum;
> + } else {
> + logmsg sprintf("test %03d...SKIPPED\n", $testnum);
> }
>
> return -1;
> @@ -2482,6 +2484,7 @@
> $prev = $pid;
> }
> }
> + undef %run;
> ftpkillslaves($verbose);
> }
>
> ----------------------------------------------------------------

Scratch that patch. What was I thinking about? It is not safe to undef a
hash and then use it again, since the scope of the new hash may be
different from the original. Instead, hash keys should be deleted.
Corrected patch is below.

----------------------------------------------------------------
andyt_at_mate: tests> diff -u runtests.pl.orig runtests.pl
--- runtests.pl.orig 2008-08-11 23:32:57.702335761 -0500
+++ runtests.pl 2008-08-17 10:54:30.453333348 -0500
@@ -387,7 +387,7 @@
      my @paths=(split(":", $ENV{'PATH'}), "/usr/sbin", "/usr/local/sbin",
                 "/sbin", "/usr/bin", "/usr/local/bin" );
      for(@paths) {
- if( -x "$_/$cmd") {
+ if( -x "$_/$cmd" && ! -d "$_/$cmd") {
              return "$_/$cmd";
          }
      }
@@ -1856,6 +1856,8 @@

          if(!$short) {
              printf "test %03d SKIPPED: $why\n", $testnum;
+ } else {
+ logmsg sprintf("test %03d...SKIPPED\n", $testnum);
          }

          return -1;
@@ -2481,6 +2483,7 @@
              }
              $prev = $pid;
          }
+ delete $run{$server};
      }
      ftpkillslaves($verbose);
  }
----------------------------------------------------------------

Regards,

Andy

Dr Andy Tsouladze
Sr Unix/Storage SysAdmin
Information Resources
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-08-17