Loading tests/FILEFORMAT +3 −0 Original line number Diff line number Diff line Loading @@ -190,4 +190,7 @@ the file's contents must be identical to this <upload> the contents of the upload data curl should have sent </upload> <valgrind> disable - disables the valgrind log check for this test </valgrind> </verify> tests/runtests.pl +59 −32 Original line number Diff line number Diff line Loading @@ -1351,13 +1351,6 @@ sub singletest { return 1; } # the test succeeded, remove all log files if(!$keepoutfiles) { cleardir($LOGDIR); } unlink($FTPDCMD); # remove the instructions for this test @what = getpart("client", "killserver"); for(@what) { my $serv = $_; Loading Loading @@ -1398,6 +1391,11 @@ sub singletest { } } if($valgrind) { # this is the valid protocol blurb curl should generate my @disable= getpart("verify", "valgrind"); if($disable[0] !~ /disable/) { opendir(DIR, "log") || return 0; # can't open log dir my @files = readdir(DIR); Loading @@ -1405,34 +1403,63 @@ sub singletest { my $f; my $l; foreach $f (@files) { if($f =~ /^valgrind$testnum/) { if($f =~ /^valgrind$testnum\.pid/) { $l = $f; last; } } my $leak; open(VAL, "<$l"); my $invalidread; my $error; open(VAL, "<log/$l"); while(<VAL>) { if($_ =~ /definitely lost: (\d*) bytes/) { $leak = $1; if($leak) { $error++; } last; } if($_ =~ /Invalid read of size (\d+)/) { $invalidread = $1; $error++; last; } } close(VAL); if($leak) { if($error) { print " valgrind ERROR "; if($leak) { print "\n Leaked $leak bytes\n"; } if($invalidread) { print "\n Read $invalidread invalid bytes\n"; } return 1; } elsif(!$short) { print " valgrind OK"; } } else { if(!$short) { print " valgrind SKIPPED"; } } } if($short) { print "OK"; } print "\n"; # the test succeeded, remove all log files if(!$keepoutfiles) { cleardir($LOGDIR); } unlink($FTPDCMD); # remove the instructions for this test return 0; } Loading Loading
tests/FILEFORMAT +3 −0 Original line number Diff line number Diff line Loading @@ -190,4 +190,7 @@ the file's contents must be identical to this <upload> the contents of the upload data curl should have sent </upload> <valgrind> disable - disables the valgrind log check for this test </valgrind> </verify>
tests/runtests.pl +59 −32 Original line number Diff line number Diff line Loading @@ -1351,13 +1351,6 @@ sub singletest { return 1; } # the test succeeded, remove all log files if(!$keepoutfiles) { cleardir($LOGDIR); } unlink($FTPDCMD); # remove the instructions for this test @what = getpart("client", "killserver"); for(@what) { my $serv = $_; Loading Loading @@ -1398,6 +1391,11 @@ sub singletest { } } if($valgrind) { # this is the valid protocol blurb curl should generate my @disable= getpart("verify", "valgrind"); if($disable[0] !~ /disable/) { opendir(DIR, "log") || return 0; # can't open log dir my @files = readdir(DIR); Loading @@ -1405,34 +1403,63 @@ sub singletest { my $f; my $l; foreach $f (@files) { if($f =~ /^valgrind$testnum/) { if($f =~ /^valgrind$testnum\.pid/) { $l = $f; last; } } my $leak; open(VAL, "<$l"); my $invalidread; my $error; open(VAL, "<log/$l"); while(<VAL>) { if($_ =~ /definitely lost: (\d*) bytes/) { $leak = $1; if($leak) { $error++; } last; } if($_ =~ /Invalid read of size (\d+)/) { $invalidread = $1; $error++; last; } } close(VAL); if($leak) { if($error) { print " valgrind ERROR "; if($leak) { print "\n Leaked $leak bytes\n"; } if($invalidread) { print "\n Read $invalidread invalid bytes\n"; } return 1; } elsif(!$short) { print " valgrind OK"; } } else { if(!$short) { print " valgrind SKIPPED"; } } } if($short) { print "OK"; } print "\n"; # the test succeeded, remove all log files if(!$keepoutfiles) { cleardir($LOGDIR); } unlink($FTPDCMD); # remove the instructions for this test return 0; } Loading