]> granicus.if.org Git - curl/commitdiff
runtests: remove the valgrind parser
authorDaniel Stenberg <daniel@haxx.se>
Wed, 21 Dec 2016 14:10:14 +0000 (15:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Dec 2016 22:42:43 +0000 (23:42 +0100)
Old legacy parsing that 1) hid problems for us and 2) probably isn't
needed anymore.

tests/runtests.pl
tests/valgrind.pm

index cd6840c52758ead34085a743205d58fbeb4bc81d..583ba3b7fd37ee4fe06b907a138d582142936305 100755 (executable)
@@ -3594,7 +3594,7 @@ sub singletest {
             $usevalgrind = 1;
             my $valgrindcmd = "$valgrind ";
             $valgrindcmd .= "$valgrind_tool " if($valgrind_tool);
-            $valgrindcmd .= "--leak-check=yes ";
+            $valgrindcmd .= "--quiet --leak-check=yes ";
             $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
            # $valgrindcmd .= "--gen-suppressions=all ";
             $valgrindcmd .= "--num-callers=16 ";
index 838183b442db3dbf40c5f12999aa21c3e8a56963..e6f66fd50795d542412ae156ebad32a5917ed311 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -26,90 +26,9 @@ sub valgrindparse {
     my ($srcdir,     # the dir in which the runtests script resides
         $sslenabled,
         $file) = @_;
-    my $leak;
-    my $invalidread;
-    my $uninitedvar;
-    my $error;
-    my $partial;
-    my $us;
-
     my @o;
-
-    my $bt=0;
-    my $nssinit=0;
-
     open(VAL, "<$file");
-    while(<VAL>) {
-        if($bt) {
-            # back trace parsing
-            if($_ =~ /^==(\d+)== *(at|by) 0x([0-9A-F]+): (.*)/) {
-                my $w = $4;
-                if($w =~ /(.*) \(([^:]*):(\d+)/) {
-                    my ($func, $source, $line)=($1, $2, $3);
-                    my $sourcename = basename($source);
-                    if(-f "$srcdir/../src/$sourcename" ||
-                       -f "$srcdir/../lib/$sourcename") {
-                        # this is our source
- #                       print "$func() at $source:$line\n";
-                        $us++;
-                    } #else {print "Not our source: $func, $source, $line\n";}
-                }
-
-                # the memory leakage within NSS_InitContext is not a bug of curl
-                if($w =~ /NSS_InitContext/) {
-                    $nssinit++;
-                }
-            }
-            else {
-                if($us and not $nssinit) {
-                    # the stack trace included source details about us
-
-                    $error++;
-                    if($leak) {
-                        push @o, "\n Leaked $leak bytes\n";
-                    }
-                    if($invalidread) {
-                        push @o, "\n Read $invalidread invalid bytes\n";
-                    }
-                    if($uninitedvar) {
-                        push @o, "\n Conditional jump or move depends on uninitialised value(s)\n";
-                    }
-                }
-                $bt = 0; # no more backtrace
-                $us = 0;
-                $nssinit = 0;
-            }
-        }
-        else {
-            if($_ =~ /(\d+) bytes in (\d+) blocks are definitely lost/) {
-                $leak = $1;
-                if($leak) {
-                    $error++;
-                }
-                $bt = 1;
-            }
-            elsif($_ =~ /Invalid read of size (\d+)/) {
-                $invalidread = $1;
-                $error++;
-                $bt = 1;
-            }
-            elsif($_ =~ /Conditional jump or move/) {
-                # If we require SSL, this test case most probaly makes
-                # us use OpenSSL. OpenSSL produces numerous valgrind
-                # errors of this kind, rendering it impossible for us to
-                # detect (valid) reports on actual curl or libcurl code.
-
-                if(!$sslenabled) {
-                    $uninitedvar = 1;
-                    $error++;
-                    $bt = 1;
-                }
-                else {
-                    $partial=1;
-                }
-            }
-        }
-    }
+    @o = <VAL>;
     close(VAL);
     return @o;
 }