Lines Matching +full:vc +full:- +full:vars
22 # SPDX-License-Identifier: curl
30 # $HOSTIP, $HOST6IP - Set to the address of the host running the test suite
31 # $CLIENTIP, $CLIENT6IP - Set to the address of the host running curl
32 # runclient, runclientoutput - Modify to copy all the files in the log/
51 # Finally, to properly support -g and -n, checktestcmd needs to change
54 # fixed. As long as the -g option is never given, and the -n is always
62 # usually set by the Makefile, but for out-of-tree builds with direct
133 my %PORT = (nolisten => 47); # port we use for a local non-listening service
161 my $SOCKSIN="$LOGDIR/socksd-request.log"; # what curl sent to the SOCKS proxy
165 my $CURLCONFIG="../curl-config"; # curl-config from current build
179 my $perl="perl -I$srcdir";
182 my $debug_build=0; # built debug enabled (--enable-debug)
183 my $has_memory_tracking=0; # built with memory tracking (--enable-curldebug)
201 my $valgrind_logfile="--logfile";
206 my $uname_release = `uname -r`;
226 my $has_gssapi; # set if libcurl is built with a GSS-API library
230 my $has_tls_srp; # set if libcurl is built with TLS-SRP support
234 my $has_httpsproxy; # set if libcurl is built with HTTPS-proxy support
236 my $has_cares; # set if built with c-ares
239 my $has_altsvc; # set if libcurl is built with alt-svc support
243 my $has_manual; # set if built with built-in manual
245 my $has_mingw; # set if built with MinGW (as opposed to MinGW-w64)
252 my $has_threadsafe; # set if libcurl is built with thread-safety support
258 my $has_openssl; # built with a lib using an OpenSSL-like API
327 my $run_event_based; # run curl with --test-event to test the event API
409 # provide defaults from our config file for ENV vars not explicitly
427 my $nghttpx_version=join(' ', runclientoutput("$ENV{'NGHTTPX'} -v"));
501 return (-1,-1);
519 # Ugly hack but ssh client and gnutls-serv don't support pid files
533 return (-1,-1);
538 while($count--) {
539 if(-f $pidfile && -s $pidfile && open(PID, "<$pidfile")) {
555 # return (-1,-1);
580 if( -x "$_/$cmd" && ! -d "$_/$cmd") {
592 # If a non-default $TESTDIR is being used there may not be any
655 # memanalyze -v is our friend, get the number of allocations made
657 my @out = `$memanalyze -v $memdump`;
671 my $discard = scalar(@ttests) - $shallow;
681 $discard--;
694 # --shallow can undefine them
720 $valgrindcmd .= "--quiet --leak-check=yes ";
721 $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
722 # $valgrindcmd .= "--gen-suppressions=all ";
723 $valgrindcmd .= "--num-callers=16 ";
742 if(-r "core") {
753 logmsg "FAIL: torture $testnum - valgrind\n";
782 logmsg `$memanalyze -l $memdump`;
788 " invoke with \"-t$limit\" to repeat this single case.\n";
816 if($server =~ /^(ftp|imap|pop3|smtp)s?(\d*)(-ipv6|)$/) {
826 if($server =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
827 # given a stunnel based ssl server, also kill non-ssl underlying one
830 elsif($server =~ /^(ftp|http|imap|pop3|smtp)((\d*)(-ipv6|-unix|))$/) {
831 # given a non-ssl server, also kill stunnel based ssl piggybacking one
834 elsif($server =~ /^(socks)((\d*)(-ipv6|))$/) {
838 elsif($server =~ /^(ssh)((\d*)(-ipv6|))$/) {
872 $result = -1;
880 unlink($pidfile) if(-f $pidfile);
890 return " --proxy $proxy_address ";
909 unlink($verifyout) if(-f $verifyout);
913 unlink($verifylog) if(-f $verifylog);
920 my $flags = "--max-time $server_response_maxtime ";
921 $flags .= "--output $verifyout ";
922 $flags .= "--silent ";
923 $flags .= "--verbose ";
924 $flags .= "--globoff ";
925 $flags .= "--unix-socket '$port_or_path' " if $ipvnum eq "unix";
926 $flags .= "--insecure " if($proto eq 'https');
941 return -1;
969 return -1;
973 return -1;
993 unlink($verifylog) if(-f $verifylog);
996 $extra .= "--insecure --ftp-ssl-control ";
999 my $flags = "--max-time $server_response_maxtime ";
1000 $flags .= "--silent ";
1001 $flags .= "--verbose ";
1002 $flags .= "--globoff ";
1018 return -1;
1035 my $took = int(0.5+time()-$time);
1058 unlink($verifyout) if(-f $verifyout);
1062 unlink($verifylog) if(-f $verifylog);
1064 my $flags = "--max-time $server_response_maxtime ";
1065 $flags .= "--output $verifyout ";
1066 $flags .= "--silent ";
1067 $flags .= "--verbose ";
1068 $flags .= "--globoff ";
1084 return -1;
1112 return -1;
1116 return -1;
1142 $pid = -1;
1160 return -1;
1166 return -1;
1170 my $cmd = "\"$sftp\" -b $sftpcmds -F $sftpconfig -S \"$ssh\" $ip > $sftplog 2>&1";
1186 # Verify that the non-stunnel HTTP TLS extensions capable server that runs
1199 unlink($verifyout) if(-f $verifyout);
1203 unlink($verifylog) if(-f $verifylog);
1205 my $flags = "--max-time $server_response_maxtime ";
1206 $flags .= "--output $verifyout ";
1207 $flags .= "--verbose ";
1208 $flags .= "--globoff ";
1209 $flags .= "--insecure ";
1210 $flags .= "--tlsauthtype SRP ";
1211 $flags .= "--tlsuser jsmith ";
1212 $flags .= "--tlspassword abc ";
1227 return -1;
1258 $pid = -1;
1266 return -1;
1270 return -1;
1294 $pid = -1;
1315 unlink($verifylog) if(-f $verifylog);
1317 my $flags = "--max-time $server_response_maxtime ";
1318 $flags .= "--silent ";
1319 $flags .= "--verbose ";
1320 $flags .= "--globoff ";
1321 $flags .= "-u 'curltest:curltest' ";
1334 return -1;
1351 my $took = int(0.5+time()-$time);
1376 unlink($verifylog) if(-f $verifylog);
1378 my $flags = "--max-time $server_response_maxtime ";
1379 $flags .= "--silent ";
1380 $flags .= "--verbose ";
1381 $flags .= "--globoff ";
1382 $flags .= "--upload-file - ";
1395 return -1;
1412 my $took = int(0.5+time()-$time);
1431 # and 'httptls' is used for non-stunnel https test servers.
1461 while($count--) {
1513 my $exe = "$perl $srcdir/http2-server.pl";
1514 my $verbose_flag = "--verbose ";
1529 unlink($pidfile) if(-f $pidfile);
1535 $flags .= "--nghttpx \"$ENV{'NGHTTPX'}\" ";
1536 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1537 $flags .= "--connect $HOSTIP:" . protoport("http") . " ";
1546 my $aflags = "--port $port --port2 $port2 $flags";
1562 "http-port $port https-port $port2 ".
1586 my $exe = "$perl $srcdir/http3-server.pl";
1587 my $verbose_flag = "--verbose ";
1602 unlink($pidfile) if(-f $pidfile);
1608 $flags .= "--nghttpx \"$ENV{'NGHTTPX'}\" ";
1609 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1610 $flags .= "--connect $HOSTIP:" . protoport("http") . " ";
1611 $flags .= "--cert \"$cert\" " if($cert);
1618 my $aflags = "--port $port $flags";
1656 my $exe = "$perl $srcdir/http-server.pl";
1657 my $verbose_flag = "--verbose ";
1687 unlink($pidfile) if(-f $pidfile);
1693 $flags .= "--gopher " if($proto eq "gopher");
1694 $flags .= "--connect $HOSTIP " if($alt eq "proxy");
1696 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1697 $flags .= "--portfile $portfile ";
1698 $flags .= "--id $idnum " if($idnum > 1);
1700 $flags .= "--unix-socket '$port_or_path' ";
1702 $flags .= "--ipv$ipvnum --port 0 ";
1704 $flags .= "--srcdir \"$TESTDIR/..\"";
1758 # the https-proxy runs as https2
1779 unlink($pidfile) if(-f $pidfile);
1787 $flags .= "--verbose " if($debugprotocol);
1788 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1789 $flags .= "--id $idnum " if($idnum > 1);
1790 $flags .= "--ipv$ipvnum --proto $proto ";
1791 $flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
1792 $flags .= "--stunnel \"$stunnel\" --srcdir \"$srcdir\" ";
1794 $flags .= "--connect " . protoport("gopher");
1797 $flags .= "--connect " . protoport("http");
1800 # for HTTPS-proxy we connect to the HTTP proxy
1801 $flags .= "--connect " . protoport("httpproxy");
1809 my $options = "$flags --accept $port";
1835 # start the non-stunnel HTTP TLS extensions capable server
1866 unlink($pidfile) if(-f $pidfile);
1872 $flags .= "--http ";
1873 $flags .= "--debug 1 " if($debugprotocol);
1874 $flags .= "--priority NORMAL:+SRP ";
1875 $flags .= "--srppasswd $srcdir/certs/srp-verifier-db ";
1876 $flags .= "--srppasswdconf $srcdir/certs/srp-verifier-conf";
1882 my $allflags = "--port $port $flags";
1935 unlink($pidfile) if(-f $pidfile);
1941 $flags .= "--verbose " if($debugprotocol);
1942 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1943 $flags .= "--portfile \"$portfile\" ";
1944 $flags .= "--srcdir \"$srcdir\" --proto $proto ";
1945 $flags .= "--id $idnum " if($idnum > 1);
1946 $flags .= "--ipv$ipvnum --port 0 --addr \"$ip\"";
2022 unlink($pidfile) if(-f $pidfile);
2030 $flags .= "--verbose " if($debugprotocol);
2031 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
2032 $flags .= "--id $idnum " if($idnum > 1);
2033 $flags .= "--ipv$ipvnum --proto $proto ";
2034 $flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
2035 $flags .= "--stunnel \"$stunnel\" --srcdir \"$srcdir\" ";
2036 $flags .= "--connect $clearport";
2045 my $options = "$flags --accept $port";
2107 unlink($pidfile) if(-f $pidfile);
2113 $flags .= "--verbose " if($debugprotocol);
2114 $flags .= "--pidfile \"$pidfile\" ".
2115 "--portfile \"$portfile\" ".
2116 "--logfile \"$logfile\" ";
2117 $flags .= "--id $idnum " if($idnum > 1);
2118 $flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
2189 unlink($pidfile) if(-f $pidfile);
2195 $flags .= "--verbose " if($debugprotocol);
2196 $flags .= "--pidfile \"$pidfile\" ".
2197 "--portfile \"$portfile\" ".
2198 "--logfile \"$logfile\" ";
2199 $flags .= "--id $idnum " if($idnum > 1);
2200 $flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
2274 unlink($pidfile) if(-f $pidfile);
2281 $flags .= "--verbose " if($verbose);
2282 $flags .= "--debugprotocol " if($debugprotocol);
2283 $flags .= "--pidfile \"$pidfile\" ";
2284 $flags .= "--id $idnum " if($idnum > 1);
2285 $flags .= "--ipv$ipvnum --addr \"$ip\" ";
2286 $flags .= "--user \"$USER\"";
2301 my $options = "$flags --sshport $port";
2355 ($SSHSRVMD5 !~ /^[a-f0-9]{32}$/i))
2409 unlink($pidfile) if(-f $pidfile);
2415 # start our MQTT server - on a random port!
2417 " --port 0 ".
2418 " --pidfile $pidfile".
2419 " --portfile $portfile".
2420 " --config $FTPDCMD";
2470 unlink($pidfile) if(-f $pidfile);
2480 " --pidfile $pidfile".
2481 " --unix-socket $SOCKSUNIXPATH".
2482 " --backend $HOSTIP".
2483 " --config $FTPDCMD";
2486 " --port 0 ".
2487 " --pidfile $pidfile".
2488 " --portfile $portfile".
2489 " --backend $HOSTIP".
2490 " --config $FTPDCMD";
2543 unlink($pidfile) if(-f $pidfile);
2549 $flags .= "--verbose 1 " if($debugprotocol);
2550 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
2551 $flags .= "--id $idnum " if($idnum > 1);
2552 $flags .= "--srcdir \"$srcdir\" ";
2553 $flags .= "--host $HOSTIP";
2559 my $aflags = "--port $port $flags";
2615 unlink($pidfile) if(-f $pidfile);
2621 $flags .= "--verbose 1 " if($debugprotocol);
2622 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
2623 $flags .= "--id $idnum " if($idnum > 1);
2624 $flags .= "--srcdir \"$srcdir\" ";
2625 $flags .= "--host $HOSTIP";
2631 my $aflags = "--port $port $flags";
2687 unlink($pidfile) if(-f $pidfile);
2693 $flags .= "--verbose 1 " if($debugprotocol);
2694 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
2695 $flags .= "--id $idnum " if($idnum > 1);
2696 $flags .= "--srcdir \"$srcdir\"";
2702 my $aflags = "--port $port $flags";
2821 # Single shot non-stunnel HTTP TLS extensions capable server
2855 my @handles = `$handle $dir -accepteula -nobanner`;
2857 if($handle =~ /^(\S+)\s+pid:\s+(\d+)\s+type:\s+(\w+)\s+([0-9A-F]+):\s+(.+)\r\r/) {
2862 system("taskkill.exe -f -fi \"IMAGENAME eq $1\" -fi \"PID eq $2\" >nul 2>&1");
2884 if(-d "$dir/$file") {
2926 logmsg "FAIL: $testnum - $testname - $subject\n";
2933 $feature{"alt-svc"} = $has_altsvc;
2936 $feature{"c-ares"} = $has_cares;
2941 $feature{"GSS-API"} = $has_gssapi;
2946 $feature{"https-proxy"} = $has_httpsproxy;
2973 $feature{"threaded-resolver"} = $has_threadedres;
2975 $feature{"TLS-SRP"} = $has_tls_srp;
2979 $feature{"unix-sockets"} = $has_unix;
2996 $feature{"HTTP-auth"} = 1;
3001 $feature{"shuffle-dns"} = 1;
3003 $feature{"verbose-strings"} = 1;
3005 $feature{"headers-api"} = 1;
3008 $feature{"nghttpx-h3"} = !!$nghttpx_h3;
3029 my $versioncmd="$CURL --version 1>$curlverout 2>$curlvererr";
3065 # Win32-style path.
3069 $has_mingw = 1 if ($curl =~ /-pc-mingw32/);
3083 elsif ($libcurl =~ /\srustls-ffi\b/i) {
3115 $resolver="c-ares";
3127 if ($libcurl =~ /libssh\/([0-9.]*)\//i) {
3145 # Generate a "proto-ipv6" version of each protocol to match the
3146 # IPv6 <server> name and a "proto-unix" to match the variant which
3149 push @protocols, map(("$_-ipv6", "$_-unix"), @protocols);
3151 # 'http-proxy' is used in test cases to do CONNECT through
3152 push @protocols, 'http-proxy';
3160 # built with memory tracking support (--enable-curldebug)
3164 # curl was built with --enable-debug
3213 if($feat =~ /GSS-API/i) {
3214 # GSS-API enabled
3235 if($feat =~ /TLS-SRP/i) {
3236 # TLS-SRP enabled
3243 if($feat =~ /alt-svc/i) {
3244 # alt-svc enabled
3269 if($feat =~ /HTTPS-proxy/) {
3272 # 'https-proxy' is used as "server" so consider it a protocol
3273 push @protocols, 'https-proxy';
3283 # Test harness currently uses a non-stunnel server in order to
3284 # run HTTP TLS-SRP tests required when curl is built with https
3285 # protocol support and TLS-SRP feature enabled. For convenience
3293 if($_ =~ /^https(-ipv6|)$/) {
3300 push @protocols, 'httptls-ipv6';
3308 if ($versretval == -1) {
3326 if(-r "../lib/curl_config.h") {
3340 my $cmd = "server/sws".exe_ext('SRV')." --version";
3349 $cmd = "server/sockfilt".exe_ext('SRV')." --version";
3359 my $cmd = "server/sws".exe_ext('SRV')." --version";
3366 "TrackMemory feature (--enable-curldebug)";
3369 open(M, "$CURL -M 2>&1|");
3371 if($s =~ /built-in manual was disabled at build-time/) {
3380 $has_shared = `sh $CURLCONFIG --built-shared`;
3384 my $hosttype=join(' ', runclientoutput("uname -a"));
3404 logmsg sprintf("%s", $http_ipv6?"HTTP-IPv6 ":"");
3405 logmsg sprintf("%s", $http_unix?"HTTP-unix ":"");
3406 logmsg sprintf("%s\n", $ftp_ipv6?"FTP-IPv6 ":"");
3409 $run_event_based?"event-based ":"",
3418 logmsg sprintf("* HTTP-Unix:%s\n", $HTTPUNIXPATH);
3419 logmsg sprintf("* Socks-Unix:%s\n", $SOCKSUNIXPATH);
3495 if ($sshdid && $sshdid =~ /OpenSSH-Windows/) {
3508 # used for time-out tests and that would work on most hosts as these
3528 $d =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
3537 $d =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
3543 $d =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
3566 if(($$thing =~ /^HTTP\/(1.1|1.0|2|3) [1-5][^\x0d]*\z/) ||
3568 (($$thing =~ /^[a-z0-9_-]+: [^\x0d]*\z/i) &&
3636 # 'prepro' processes the input array and replaces %-variables in the array
3837 # test definition may instruct to (un)set environment vars
3866 unlink($FTPDCMD) if(-f $FTPDCMD);
3948 my @o = `$cmd 2>log/precheck-$testnum`;
3974 return -1;
4096 $cmd="-";
4102 # create (possibly-empty) files before starting the test
4111 return -1;
4143 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
4144 #We may slap on --output!
4146 ($cmdhash{'option'} && $cmdhash{'option'} =~ /force-output/)) {
4147 $out=" --output $CURLOUT ";
4188 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-include/)) {
4189 $inc = " --include";
4193 if($cmdhash{'option'} && ($cmdhash{'option'} =~ /binary-trace/)) {
4194 $cmdargs .= "--trace log/trace$testnum ";
4197 $cmdargs .= "--trace-ascii log/trace$testnum ";
4199 $cmdargs .= "--trace-time ";
4201 $cmdargs .= "--test-event ";
4202 $fail_due_event_based--;
4206 $cmdargs .= " --proxy $proxy_address ";
4225 if(! -f $CMDLINE) {
4228 return -1;
4236 return -1;
4242 # with --db-attach=yes or --vgdb=yes.
4249 my $stdinfile="$LOGDIR/stdin-for-$testnum";
4273 $valgrindcmd .= "--quiet --leak-check=yes ";
4274 $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
4275 # $valgrindcmd .= "--gen-suppressions=all ";
4276 $valgrindcmd .= "--num-callers=16 ";
4302 print GDBCMD "source $gdbinit\n" if -e $gdbinit;
4316 "$gdb --directory $LIBDIR $DBGCURL -x $LOGDIR/gdbcmd");
4319 my $GDBW = ($gdbxwin) ? "-w" : "";
4320 runclient("$gdb --directory $LIBDIR $DBGCURL $GDBW -x $LOGDIR/gdbcmd");
4341 if(-r "core") {
4350 logmsg "running gdb for post-mortem analysis:\n";
4354 runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
4367 while((-f $SERVERLOGS_LOCK) && $lockretry--) {
4381 # gnutls-serv also lacks this synchronization mechanism, so gnutls-serv
4497 $ok .= "-"; # stdout not checked
4527 # text mode check in hyper-mode. Sometimes necessary if the stderr
4551 $ok .= "-"; # stderr not checked
4610 $ok .= "-"; # protocol not checked
4623 $ok .= "-"; # data not checked
4647 $ok .= "-"; # upload not checked
4700 $ok .= "-"; # protocol not checked
4717 return -1;
4760 $ok .= ($outputok) ? "o" : "-"; # output checked or not
4773 # accept multiple comma-separated error codes
4799 if(! -f $memdump) {
4826 $ok .= "-"; # memory not checked
4855 logmsg "FAIL: $testnum - $testname - valgrind\n";
4871 $ok .= "-"; # skipped
4875 $ok .= "-"; # valgrind not checked
4877 # add 'E' for event-based
4878 $ok .= $evbased ? "E" : "-";
4885 my $sofar= time()-$start;
4887 my $estleft = $esttotal - $sofar;
4891 my $took = $timevrfyend{$testnum} - $timeprepini{$testnum};
4895 logmsg sprintf("OK (%-3d out of %-3d, %s, took %.3fs, %s)\n",
4899 logmsg "PASS: $testnum - $testname\n";
4951 $result = -1;
4959 unlink($pidfile) if(-f $pidfile);
4976 $what =~ s/[^a-z0-9\/-]//g;
4979 if($what =~ /^(ftp|gopher|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
5002 elsif($what eq "ftp-ipv6") {
5003 if($torture && $run{'ftp-ipv6'} &&
5005 if(stopserver('ftp-ipv6')) {
5006 return "failed stopping unresponsive FTP-IPv6 server";
5009 if(!$run{'ftp-ipv6'}) {
5012 return "failed starting FTP-IPv6 server";
5014 logmsg sprintf("* pid ftp-ipv6 => %d %d\n", $pid,
5016 $run{'ftp-ipv6'}="$pid $pid2";
5038 elsif($what eq "gopher-ipv6") {
5039 if($torture && $run{'gopher-ipv6'} &&
5042 if(stopserver('gopher-ipv6')) {
5043 return "failed stopping unresponsive GOPHER-IPv6 server";
5046 if(!$run{'gopher-ipv6'}) {
5050 return "failed starting GOPHER-IPv6 server";
5052 logmsg sprintf("* pid gopher-ipv6 => %d %d\n", $pid,
5054 $run{'gopher-ipv6'}="$pid $pid2";
5098 elsif($what eq "http-proxy") {
5099 if($torture && $run{'http-proxy'} &&
5102 if(stopserver('http-proxy')) {
5103 return "failed stopping unresponsive HTTP-proxy server";
5106 if(!$run{'http-proxy'}) {
5110 return "failed starting HTTP-proxy server";
5112 logmsg sprintf ("* pid http-proxy => %d %d\n", $pid, $pid2)
5114 $run{'http-proxy'}="$pid $pid2";
5117 elsif($what eq "http-ipv6") {
5118 if($torture && $run{'http-ipv6'} &&
5121 if(stopserver('http-ipv6')) {
5122 return "failed stopping unresponsive HTTP-IPv6 server";
5125 if(!$run{'http-ipv6'}) {
5129 return "failed starting HTTP-IPv6 server";
5131 logmsg sprintf("* pid http-ipv6 => %d %d\n", $pid, $pid2)
5133 $run{'http-ipv6'}="$pid $pid2";
5152 elsif($what eq "rtsp-ipv6") {
5153 if($torture && $run{'rtsp-ipv6'} &&
5155 if(stopserver('rtsp-ipv6')) {
5156 return "failed stopping unresponsive RTSP-IPv6 server";
5159 if(!$run{'rtsp-ipv6'}) {
5162 return "failed starting RTSP-IPv6 server";
5164 logmsg sprintf("* pid rtsp-ipv6 => %d %d\n", $pid, $pid2)
5166 $run{'rtsp-ipv6'}="$pid $pid2";
5292 elsif($what eq "https-proxy") {
5294 # we can't run https-proxy tests without stunnel
5297 if($runcert{'https-proxy'} &&
5298 ($runcert{'https-proxy'} ne $certfile)) {
5300 if(stopserver('https-proxy')) {
5301 return "failed stopping HTTPS-proxy with different cert";
5305 # we front the http-proxy with stunnel so we need to make sure the
5307 my $f = startservers("http-proxy");
5312 if(!$run{'https-proxy'}) {
5316 return "failed starting HTTPS-proxy (stunnel)";
5318 logmsg sprintf("* pid https-proxy => %d %d\n", $pid, $pid2)
5320 $run{'https-proxy'}="$pid $pid2";
5325 # for now, we can't run http TLS-EXT tests without gnutls-serv
5326 return "no gnutls-serv (with SRP support)";
5338 return "failed starting HTTPTLS server (gnutls-serv)";
5345 elsif($what eq "httptls-ipv6") {
5347 # for now, we can't run http TLS-EXT tests without gnutls-serv
5348 return "no gnutls-serv";
5350 if($torture && $run{'httptls-ipv6'} &&
5352 if(stopserver('httptls-ipv6')) {
5353 return "failed stopping unresponsive HTTPTLS-IPv6 server";
5356 if(!$run{'httptls-ipv6'}) {
5360 return "failed starting HTTPTLS-IPv6 server (gnutls-serv)";
5362 logmsg sprintf("* pid httptls-ipv6 => %d %d\n", $pid, $pid2)
5364 $run{'httptls-ipv6'}="$pid $pid2";
5384 elsif($what eq "tftp-ipv6") {
5385 if($torture && $run{'tftp-ipv6'} &&
5387 if(stopserver('tftp-ipv6')) {
5388 return "failed stopping unresponsive TFTP-IPv6 server";
5391 if(!$run{'tftp-ipv6'}) {
5395 return "failed starting TFTP-IPv6 server";
5397 printf("* pid tftp-ipv6 => %d %d\n", $pid, $pid2) if($verbose);
5398 $run{'tftp-ipv6'}="$pid $pid2";
5441 elsif($what eq "http-unix") {
5442 if($torture && $run{'http-unix'} &&
5444 if(stopserver('http-unix')) {
5445 return "failed stopping unresponsive HTTP-unix server";
5448 if(!$run{'http-unix'}) {
5453 return "failed starting HTTP-unix server";
5455 logmsg sprintf("* pid http-unix => %d %d\n", $pid, $pid2)
5457 $run{'http-unix'}="$pid $pid2";
5522 for(my $i = scalar(@what) - 1; $i >= 0; $i--) {
5529 if($server =~ /^(httptls)(\+)(ext|srp)(\d*)(-ipv6|)$/) {
5531 $tlsext = uc("TLS-${3}");
5551 # runtimestats displays test-suite run time statistics
5576 $timesrvrtot += $timesrvrend{$testnum} - $timesrvrini{$testnum};
5578 (($timetoolini{$testnum} - $timeprepini{$testnum}) -
5579 ($timesrvrend{$testnum} - $timesrvrini{$testnum}));
5580 $timetooltot += $timetoolend{$testnum} - $timetoolini{$testnum};
5581 $timelocktot += $timesrvrlog{$testnum} - $timetoolend{$testnum};
5582 $timevrfytot += $timevrfyend{$testnum} - $timesrvrlog{$testnum};
5583 $timetesttot += $timevrfyend{$testnum} - $timeprepini{$testnum};
5585 $timesrvrend{$testnum} - $timesrvrini{$testnum}, $testnum);
5587 ($timetoolini{$testnum} - $timeprepini{$testnum}) -
5588 ($timesrvrend{$testnum} - $timesrvrini{$testnum}), $testnum);
5590 $timetoolend{$testnum} - $timetoolini{$testnum}, $testnum);
5592 $timesrvrlog{$testnum} - $timetoolend{$testnum}, $testnum);
5594 $timevrfyend{$testnum} - $timesrvrlog{$testnum}, $testnum);
5596 $timevrfyend{$testnum} - $timeprepini{$testnum}, $testnum);
5626 logmsg "-time- test\n";
5627 logmsg "------ ----\n";
5629 last if((not $fullstats) && (not $counter--));
5636 logmsg "-time- test\n";
5637 logmsg "------ ----\n";
5639 last if((not $fullstats) && (not $counter--));
5646 logmsg "-time- test\n";
5647 logmsg "------ ----\n";
5649 last if((not $fullstats) && (not $counter--));
5656 logmsg "-time- test\n";
5657 logmsg "------ ----\n";
5659 last if((not $fullstats) && (not $counter--));
5666 logmsg "-time- test\n";
5667 logmsg "------ ----\n";
5669 last if((not $fullstats) && (not $counter--));
5676 logmsg "-time- test\n";
5677 logmsg "------ ----\n";
5679 last if((not $fullstats) && (not $counter--));
5692 if(@ARGV && $ARGV[-1] eq '$TFLAGS') {
5698 my $fromnum=-1;
5701 if ($ARGV[0] eq "-v") {
5705 elsif ($ARGV[0] eq "-c") {
5710 elsif ($ARGV[0] eq "-vc") {
5720 elsif ($ARGV[0] eq "-ac") {
5725 elsif ($ARGV[0] eq "-d") {
5729 elsif($ARGV[0] eq "-e") {
5733 elsif($ARGV[0] eq "-f") {
5734 # force - run the test case even if listed in DISABLED
5737 elsif($ARGV[0] eq "-E") {
5759 elsif ($ARGV[0] eq "-g") {
5763 elsif ($ARGV[0] eq "-gw") {
5768 elsif($ARGV[0] eq "-s") {
5772 elsif($ARGV[0] eq "-am") {
5773 # automake-style output
5777 elsif($ARGV[0] eq "-n") {
5781 elsif($ARGV[0] eq "--no-debuginfod") {
5785 elsif ($ARGV[0] eq "-R") {
5789 elsif($ARGV[0] =~ /^-t(.*)/) {
5798 elsif($ARGV[0] =~ /--shallow=(\d+)/) {
5804 elsif($ARGV[0] =~ /--repeat=(\d+)/) {
5805 # Repeat-run the given tests this many times
5808 elsif($ARGV[0] =~ /--seed=(\d+)/) {
5809 # Set a fixed random seed (used for -R and --shallow)
5812 elsif($ARGV[0] eq "-a") {
5816 elsif($ARGV[0] eq "-o") {
5818 if ($ARGV[0] =~ /^(\w+)=([\w.:\/\[\]-]+)$/) {
5822 die "Failed to parse '-o $ARGV[0]'. May contain unexpected characters.\n";
5825 elsif($ARGV[0] eq "-p") {
5828 elsif($ARGV[0] eq "-P") {
5833 elsif($ARGV[0] eq "-L") {
5838 elsif($ARGV[0] eq "-l") {
5842 elsif($ARGV[0] eq "-k") {
5846 elsif($ARGV[0] eq "-r") {
5860 elsif($ARGV[0] eq "-rf") {
5874 elsif($ARGV[0] eq "-rm") {
5878 elsif($ARGV[0] eq "-u") {
5882 elsif(($ARGV[0] eq "-h") || ($ARGV[0] eq "--help")) {
5886 -a continue even if a test fails
5887 -ac path use this curl only to talk to APIs (currently only CI test APIs)
5888 -am automake style output PASS/FAIL: [number] [name]
5889 -c path use this curl executable
5890 -d display server debug info
5891 -e event-based execution
5892 -E file load the specified file to exclude certain tests
5893 -f forcibly run even if disabled
5894 -g run the test case with gdb
5895 -gw run the test case with gdb as a windowed application
5896 -h this help text
5897 -k keep stdout and stderr files present after tests
5898 -L path require an additional perl library file to replace certain functions
5899 -l list all test case names/descriptions
5900 -n no valgrind
5901 --no-debuginfod disable the valgrind debuginfod functionality
5902 -o variable=value set internal variable to the specified value
5903 -P proxy use the specified proxy
5904 -p print log file contents when a test fails
5905 -R scrambled order (uses the random seed, see --seed)
5906 -r run time statistics
5907 -rf full run time statistics
5908 -rm force removal of files by killing locking processes (Windows only)
5909 --repeat=[num] run the given tests this many times
5910 -s short output
5911 --seed=[num] set the random seed to a fixed number
5912 --shallow=[num] randomly makes the torture tests "thinner"
5913 -t[N] torture (simulate function failures); N means fail Nth function
5914 -u error instead of warning on server unexpectedly alive
5915 -v verbose output
5916 -vc path use this curl only to verify the existing servers
5933 $fromnum = -1;
5943 $fromnum = -1;
5947 $fromnum = -1;
5956 elsif($ARGV[0] =~ /^([-[{a-zA-Z].*)/) {
5973 open(C, "$CURL --version 2>/dev/null|");
5997 # since valgrind 2.1.x, '--tool' option is mandatory
5999 runclient("valgrind --help 2>&1 | grep -- --tool > /dev/null 2>&1");
6001 $valgrind_tool="--tool=memcheck";
6007 $valgrind="../libtool --mode=execute $valgrind";
6011 # valgrind 3 renamed the --logfile option to --log-file!!!
6012 my $ver=join(' ', runclientoutput("valgrind --version"));
6014 $ver =~ s/[^0-9.]//g;
6019 $valgrind_logfile="--log-file";
6034 $gdb = "../libtool --mode=execute gdb";
6091 if(! -f "$srcdir/data/test$n") {
6092 print STDERR "WARNING! Non-existing test $n in $file!\n";
6113 my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
6120 $_ =~ s/[a-z\/\.]*//g;
6138 if (-e "$TESTDIR/test$_") {
6202 $tailskip = $tailtotal - $tailshow;
6205 for($tailskip .. $tailtotal-1) {
6231 if((-d "$LOGDIR/$log") || (! -s "$LOGDIR/$log")) {
6280 # The main test-loop
6335 logmsg "\n - abort tests\n";
6346 my $sofar = time() - $start;
6396 $log_line .= " and ".($c-$max)." more";