]> granicus.if.org Git - curl/commitdiff
runtests: disable memory tracking with threaded resolver
authorDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jan 2014 12:20:29 +0000 (13:20 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jan 2014 12:20:29 +0000 (13:20 +0100)
The built-in memory debug system doesn't work with multi-threaded use so
instead of causing annoying false positives, disable the memory tracking
if the threaded resolver is used.

tests/runtests.pl

index b591414120ae2c25ac23b66985bd223e5a19a03a..9fd49ad31993a54673c42eee59a7b7a064f035ba 100755 (executable)
@@ -226,6 +226,10 @@ my $has_darwinssl;# build with DarwinSSL (Secure Transport)
 
 my $has_shared = "unknown";  # built shared
 
+my $resolver;     # string to hold the resolver backend
+my $has_cares;    # if built with c-ares
+my $has_threadedres; # if built with threaded resolver
+
 my $ssllib;      # name of the lib we use (for human presentation)
 my $has_crypto;  # set if libcurl is built with cryptographic support
 my $has_textaware; # set if running on a system that has a text mode concept
@@ -2283,6 +2287,7 @@ sub checksystem {
     @version = <VERSOUT>;
     close(VERSOUT);
 
+    $resolver="stock";
     for(@version) {
         chomp;
 
@@ -2344,6 +2349,10 @@ sub checksystem {
                $has_darwinssl=1;
                $ssllib="DarwinSSL";
            }
+           elsif ($libcurl =~ /ares/i) {
+               $has_cares=1;
+               $resolver="c-ares";
+           }
         }
         elsif($_ =~ /^Protocols: (.*)/i) {
             # these are the protocols compiled in to this libcurl
@@ -2415,6 +2424,13 @@ sub checksystem {
                 # Metalink enabled
                 $has_metalink=1;
             }
+            if($feat =~ /AsynchDNS/i) {
+                if(!$has_cares) {
+                    # this means threaded resolver
+                    $has_threadedres=1;
+                    $resolver="threaded";
+                }
+            }
         }
         #
         # Test harness currently uses a non-stunnel server in order to
@@ -2511,6 +2527,13 @@ sub checksystem {
     "* Host: $hostname",
     "* System: $hosttype");
 
+    if($has_memory_tracking && $has_threadedres) {
+        $has_memory_tracking = 0;
+        logmsg("*\n",
+               "*** DISABLES memory tracking when using threaded resolver\n",
+               "*\n");
+    }
+
     logmsg sprintf("* Server SSL:   %8s", $stunnel?"ON ":"OFF");
     logmsg sprintf("  libcurl SSL:  %s\n", $ssl_version?"ON ":"OFF");
     logmsg sprintf("* debug build:  %8s", $debug_build?"ON ":"OFF");
@@ -2519,7 +2542,8 @@ sub checksystem {
     logmsg sprintf("  HTTP IPv6     %s\n", $http_ipv6?"ON ":"OFF");
     logmsg sprintf("* FTP IPv6      %8s", $ftp_ipv6?"ON ":"OFF");
     logmsg sprintf("  Libtool lib:  %s\n", $libtool?"ON ":"OFF");
-    logmsg sprintf("* Shared build:      %s\n", $has_shared);
+    logmsg sprintf("* Shared build:      %-3s", $has_shared);
+    logmsg sprintf("  Resolver:     %s\n", $resolver);
     if($ssl_version) {
         logmsg sprintf("* SSL library: %13s\n", $ssllib);
     }