# enable memory debugging if curl is compiled with it
$ENV{'CURL_MEMDEBUG'} = $memdump;
+$ENV{'CURL_ENTROPY'}="12345678";
+$ENV{'CURL_FORCETIME'}=1; # for debug NTLM magic
$ENV{'HOME'}=$pwd;
sub catch_zap {
else {
$ret = runclient($testcmd);
}
- #logmsg "$_ Returned " . $ret >> 8 . "\n";
+ #logmsg "$_ Returned " . ($ret >> 8) . "\n";
# Now clear the variable again
delete $ENV{'CURL_MEMLIMIT'} if($ENV{'CURL_MEMLIMIT'});
# verify that it returns a proper error code, doesn't leak memory
# and doesn't core dump
- if($ret & 255) {
+ if(($ret & 255) || ($ret >> 8) >= 128) {
logmsg " system() returned $ret\n";
$fail=1;
}
close(FILE);
}
- if($data && ($data =~ /GNUTLS/) && open(FILE, "<$pidfile")) {
+ if($data && ($data =~ /(GNUTLS|GnuTLS)/) && open(FILE, "<$pidfile")) {
$pid=0+<FILE>;
close(FILE);
if($pid > 0) {
$flags .= "--http ";
$flags .= "--debug 1 " if($debugprotocol);
$flags .= "--port $port ";
+ $flags .= "--priority NORMAL:+SRP ";
$flags .= "--srppasswd $srcdir/certs/srp-verifier-db ";
$flags .= "--srppasswdconf $srcdir/certs/srp-verifier-conf";
if($feat =~ /NTLM/i) {
# NTLM enabled
$has_ntlm=1;
+ # Use this as a proxy for any cryptographic authentication
+ $has_crypto=1;
}
if($feat =~ /NTLM_WB/i) {
# NTLM delegation to winbind daemon ntlm_auth helper enabled
$has_shared = `sh $CURLCONFIG --built-shared`;
chomp $has_shared;
- # curl doesn't list cryptographic support separately, so assume it's
- # always available
- $has_crypto=1;
-
my $hostname=join(' ', runclientoutput("hostname"));
my $hosttype=join(' ', runclientoutput("uname -a"));
my @keywords = getpart("info", "keywords");
my $match;
my $k;
+
+ if(!$keywords[0]) {
+ $why = "missing the <keywords> section!";
+ }
+
for $k (@keywords) {
chomp $k;
if ($disabled_keywords{$k}) {
$DBGCURL=$CMDLINE;
}
+ if($gdbthis) {
+ # gdb is incompatible with valgrind, so disable it when debugging
+ # Perhaps a better approach would be to run it under valgrind anyway
+ # with --db-attach=yes or --vgdb=yes.
+ $disablevalgrind=1;
+ }
+
if($fail_due_event_based) {
logmsg "This test cannot run event based\n";
return -1;
$ok .= "-"; # stdout not checked
}
- if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) {
- # verify the received data
- my @out = loadarray($CURLOUT);
- # get the mode attribute
- my $filemode=$replyattr{'mode'};
- if($filemode && ($filemode eq "text") && $has_textaware) {
- # text mode when running on windows: fix line endings
- map s/\r\n/\n/g, @reply;
- map s/\n/\r\n/g, @reply;
- }
-
- $res = compare($testnum, $testname, "data", \@out, \@reply);
- if ($res) {
- return 1;
- }
- $ok .= "d";
- }
- else {
- $ok .= "-"; # data not checked
- }
-
- if(@upload) {
- # verify uploaded data
- my @out = loadarray("$LOGDIR/upload.$testnum");
- $res = compare($testnum, $testname, "upload", \@out, \@upload);
- if ($res) {
- return 1;
- }
- $ok .= "u";
- }
- else {
- $ok .= "-"; # upload not checked
- }
-
if(@protocol) {
# Verify the sent request
my @out = loadarray($SERVERIN);
$ok .= "-"; # protocol not checked
}
+ if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) {
+ # verify the received data
+ my @out = loadarray($CURLOUT);
+ # get the mode attribute
+ my $filemode=$replyattr{'mode'};
+ if($filemode && ($filemode eq "text") && $has_textaware) {
+ # text mode when running on windows: fix line endings
+ map s/\r\n/\n/g, @reply;
+ map s/\n/\r\n/g, @reply;
+ }
+
+ $res = compare($testnum, $testname, "data", \@out, \@reply);
+ if ($res) {
+ return 1;
+ }
+ $ok .= "d";
+ }
+ else {
+ $ok .= "-"; # data not checked
+ }
+
+ if(@upload) {
+ # verify uploaded data
+ my @out = loadarray("$LOGDIR/upload.$testnum");
+ $res = compare($testnum, $testname, "upload", \@out, \@upload);
+ if ($res) {
+ return 1;
+ }
+ $ok .= "u";
+ }
+ else {
+ $ok .= "-"; # upload not checked
+ }
+
if(@proxyprot) {
# Verify the sent proxy request
my @out = loadarray($PROXYIN);
my $strip;
for $strip (@stripfile) {
chomp $strip;
+ my @newgen;
for(@generated) {
eval $strip;
+ if($_) {
+ push @newgen, $_;
+ }
}
+ # this is to get rid of array entries that vanished (zero
+ # length) because of replacements
+ @generated = @newgen;
}
@outfile = fixarray(@outfile);
$TESTCASES .= " $n";
}
}
+else {
+ my $verified="";
+ map {
+ if (-e "$TESTDIR/test$_") {
+ $verified.="$_ ";
+ }
+ } split(" ", $TESTCASES);
+ if($verified eq "") {
+ print "No existing test cases were specified\n";
+ exit;
+ }
+ $TESTCASES = $verified;
+}
#######################################################################
# Start the command line log