system($testcmd);
print " CMD: $testcmd\n" if($verbose);
-
+
# memanalyze -v is our friend, get the number of allocations made
my $count=0;
my @out = `$memanalyze -v $memdump`;
my $limit = $_;
my $fail;
my $dumped_core;
-
+
if($tortalloc && ($tortalloc != $limit)) {
next;
}
print "Fail alloc no: $limit\r" if($verbose);
-
+
# make the memory allocation function number $limit return failure
$ENV{'CURL_MEMLIMIT'} = $limit;
# remove memdump first to be sure we get a new nice and clean one
unlink($memdump);
-
+
print "**> Alloc number $limit is now set to fail <**\n" if($gdbthis);
my $ret;
if($gdbthis) {
system($gdbline)
- }
+ }
else {
$ret = system($testcmd);
}
}
sleep(1);
}
-
+
# now (re-)start our server:
my $flag=$debugprotocol?"-v ":"";
$flag .= "-s \"$srcdir\"";
print "$cmd\n" if($verbose);
my @data = `$cmd`;
foreach $line (@data) {
- print STDERR "We read: $_";
if ( $line =~ /WE ROOLZ: (\d+)/ ) {
$pid = 0+$1;
$verified = 1;
print OUT $_;
}
close(IN);
- close(OUT);
+ close(OUT);
return 0;
}
}
#######################################################################
-# substitute the variable stuff into either a joined up file or
+# substitute the variable stuff into either a joined up file or
# a command, in either case passed by reference
#
sub subVariables {
}
printf("test %03d...", $testnum);
-
+
for(@what) {
my $f = $_;
$f =~ s/\s//g;
$skipped++;
$skipped{$why}++;
$teststat[$testnum]=$why; # store reason for this test case
-
+
print "SKIPPED\n";
if(!$short) {
print "* Test $testnum: $why\n";
# of the datacheck
chomp($replycheck[$#replycheck]);
}
-
+
@reply=@replycheck;
}
subVariables \$fileContent;
# print "DEBUG: writing file " . $filename . "\n";
open OUTFILE, ">$filename";
- binmode OUTFILE; # for crapage systems, use binary
+ binmode OUTFILE; # for crapage systems, use binary
print OUTFILE $fileContent;
close OUTFILE;
}
$CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR";
if($verbose) {
- print "$CMDLINE\n";
+ print "$CMDLINE\n";
}
print CMDLOG "$CMDLINE\n";
}
if(!$short) {
print " output OK";
- }
+ }
}
if($errorcode == $cmdres) {
# the test succeeded, remove all log files
if(!$keepoutfiles) {
- cleardir($LOGDIR);
+ cleardir($LOGDIR);
}
unlink($FTPDCMD); # remove the instructions for this test
print " valgrind OK";
}
-
+
}
if($short) {
print "OK";
$pid = runhttpserver($verbose);
if($pid <= 0) {
return 2; # error starting
- }
+ }
printf ("* pid http => %-5d\n", $pid) if($verbose);
$run{'http'}=$pid;
}
$verbose=1;
}
elsif ($ARGV[0] eq "-c") {
- # use this path to curl instead of default
+ # use this path to curl instead of default
$CURL=$ARGV[1];
shift @ARGV;
}
elsif ($ARGV[0] eq "-d") {
- # have the servers display protocol output
+ # have the servers display protocol output
$debugprotocol=1;
}
elsif ($ARGV[0] eq "-g") {
$TESTCASES=""; # start with no test cases
- # cut off everything but the digits
+ # cut off everything but the digits
for(@cmds) {
$_ =~ s/[a-z\/\.]*//g;
}