summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-01-30 12:56:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-01-30 12:56:36 +0000
commit6a99ab098c3b291068f3573ead6815a8c58c061e (patch)
treefa5e0aeb958478adc64e0ce471c90c978780d3a6
parentb03adde5466dc95b2b0d999869605e36823c3d17 (diff)
downloadgnurl-6a99ab098c3b291068f3573ead6815a8c58c061e.tar.gz
gnurl-6a99ab098c3b291068f3573ead6815a8c58c061e.tar.bz2
gnurl-6a99ab098c3b291068f3573ead6815a8c58c061e.zip
Bugfixed the parser that scans the valgrind report outputs. I noticed that it
previously didn't detect and report the "Conditional jump or move depends on uninitialised value(s)" error. When I fixed this, I caught a few curl bugs with it. And then I had to spend time to make the test suite IGNORE these errors when OpenSSL is used since it produce massive amounts of valgrind warnings (but only of the "Conditional..." kind it seems). So, if a test that requires SSL is run, it ignores the "Conditional..." errors, and you'll get a "valgrind PARTIAL" output instead of "valgrind OK".
-rwxr-xr-xtests/runtests.pl27
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index d69e9b332..7af18d6a5 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -899,6 +899,7 @@ sub singletest {
my @what;
my $why;
+ my %feature;
# load the test case file definition
if(loadtest("${TESTDIR}/test${testnum}")) {
@@ -916,6 +917,8 @@ sub singletest {
my $f = $_;
$f =~ s/\s//g;
+ $feature{$f}=$f; # we require this feature
+
if($f eq "SSL") {
if($ssl_version) {
next;
@@ -1435,7 +1438,9 @@ sub singletest {
}
my $leak;
my $invalidread;
+ my $uninitedvar;
my $error;
+ my $partial;
open(VAL, "<log/$l");
while(<VAL>) {
@@ -1446,11 +1451,26 @@ sub singletest {
}
last;
}
- if($_ =~ /Invalid read of size (\d+)/) {
+ elsif($_ =~ /Invalid read of size (\d+)/) {
$invalidread = $1;
$error++;
last;
}
+ 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(!$feature{'SSL'}) {
+ $uninitedvar = 1;
+ $error++;
+ last;
+ }
+ else {
+ $partial=1;
+ }
+ }
}
close(VAL);
if($error) {
@@ -1461,10 +1481,13 @@ sub singletest {
if($invalidread) {
print "\n Read $invalidread invalid bytes\n";
}
+ if($uninitedvar) {
+ print "\n Conditional jump or move depends on uninitialised value(s)\n";
+ }
return 1;
}
elsif(!$short) {
- print " valgrind OK";
+ printf " valgrind %s", $partial?"PARTIAL":"OK";
}
}
else {