Lines Matching +full:srv +full:- +full:ipv4 +full:- +full:simple +full:- +full:service +full:- +full:config
9 # Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
28 # $HOSTIP, $HOST6IP - Set to the address of the host running the test suite
29 # $CLIENTIP, $CLIENT6IP - Set to the address of the host running curl
30 # runclient, runclientoutput - Modify to copy all the files in the log/
49 # Finally, to properly support -g and -n, checktestcmd needs to change
52 # fixed. As long as the -g option is never given, and the -n is always
60 # usually set by the Makefile, but for out-of-tree builds with direct
132 my $NOLISTENPORT=47; # port number we use for a local non-listening service
137 my $HTTPSPROXYPORT = $noport; # HTTPS-proxy (stunnel) port
156 my $HTTPTLSPORT=$noport; # HTTP TLS (non-stunnel) server port
157 my $HTTPTLS6PORT=$noport; # HTTP TLS (non-stunnel) IPv6 server port
190 my $CURLCONFIG="../curl-config"; # curl-config from current build
204 my $perl="perl -I$srcdir";
207 my $debug_build=0; # built debug enabled (--enable-debug)
208 my $has_memory_tracking=0; # built with memory tracking (--enable-curldebug)
226 my $valgrind_logfile="--logfile";
231 my $uname_release = `uname -r`;
251 my $has_gssapi; # set if libcurl is built with a GSS-API library
255 my $has_tls_srp; # set if libcurl is built with TLS-SRP support
257 my $has_httpsproxy; # set if libcurl is built with HTTPS-proxy support
259 my $has_cares; # set if built with c-ares
262 my $has_altsvc; # set if libcurl is built with alt-svc support
266 my $has_manual; # set if built with built-in manual
268 my $has_mingw; # set if built with MinGW (as opposed to MinGW-w64)
275 my $has_openssl; # built with a lib using an OpenSSL-like API
343 my $run_event_based; # run curl with --test-event to test the event API
493 return (-1,-1);
508 # Ugly hack but ssh client and gnutls-serv don't support pid files
522 return (-1,-1);
527 while($count--) {
528 if(-f $pidfile && -s $pidfile && open(PID, "<$pidfile")) {
544 # return (-1,-1);
569 if( -x "$_/$cmd" && ! -d "$_/$cmd") {
642 # memanalyze -v is our friend, get the number of allocations made
644 my @out = `$memanalyze -v $memdump`;
658 my $discard = scalar(@ttests) - $shallow;
668 $discard--;
681 # --shallow can undefine them
707 $valgrindcmd .= "--quiet --leak-check=yes ";
708 $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
709 # $valgrindcmd .= "--gen-suppressions=all ";
710 $valgrindcmd .= "--num-callers=16 ";
729 if(-r "core") {
740 logmsg "FAIL: torture $testnum - valgrind\n";
769 logmsg `$memanalyze -l $memdump`;
775 " invoke with \"-t$limit\" to repeat this single case.\n";
795 if($server =~ /^(ftp|imap|pop3|smtp)s?(\d*)(-ipv6|)$/) {
805 if($server =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
806 # given a stunnel based ssl server, also kill non-ssl underlying one
809 elsif($server =~ /^(ftp|http|imap|pop3|smtp)((\d*)(-ipv6|-unix|))$/) {
810 # given a non-ssl server, also kill stunnel based ssl piggybacking one
813 elsif($server =~ /^(socks)((\d*)(-ipv6|))$/) {
817 elsif($server =~ /^(ssh)((\d*)(-ipv6|))$/) {
850 unlink($pidfile) if(-f $pidfile);
858 return " --proxy $proxy_address ";
877 unlink($verifyout) if(-f $verifyout);
881 unlink($verifylog) if(-f $verifylog);
888 my $flags = "--max-time $server_response_maxtime ";
889 $flags .= "--output $verifyout ";
890 $flags .= "--silent ";
891 $flags .= "--verbose ";
892 $flags .= "--globoff ";
893 $flags .= "--unix-socket '$port_or_path' " if $ipvnum eq "unix";
894 $flags .= "--insecure " if($proto eq 'https');
909 return -1;
937 return -1;
941 return -1;
961 unlink($verifylog) if(-f $verifylog);
964 $extra .= "--insecure --ftp-ssl-control ";
967 my $flags = "--max-time $server_response_maxtime ";
968 $flags .= "--silent ";
969 $flags .= "--verbose ";
970 $flags .= "--globoff ";
986 return -1;
1003 my $took = int(0.5+time()-$time);
1026 unlink($verifyout) if(-f $verifyout);
1030 unlink($verifylog) if(-f $verifylog);
1032 my $flags = "--max-time $server_response_maxtime ";
1033 $flags .= "--output $verifyout ";
1034 $flags .= "--silent ";
1035 $flags .= "--verbose ";
1036 $flags .= "--globoff ";
1052 return -1;
1080 return -1;
1084 return -1;
1110 $pid = -1;
1118 # with generated config and key files and run a simple remote pwd.
1128 return -1;
1134 return -1;
1138 my $cmd = "\"$sftp\" -b $sftpcmds -F $sftpconfig -S \"$ssh\" $ip > $sftplog 2>&1";
1154 # Verify that the non-stunnel HTTP TLS extensions capable server that runs
1167 unlink($verifyout) if(-f $verifyout);
1171 unlink($verifylog) if(-f $verifylog);
1173 my $flags = "--max-time $server_response_maxtime ";
1174 $flags .= "--output $verifyout ";
1175 $flags .= "--verbose ";
1176 $flags .= "--globoff ";
1177 $flags .= "--insecure ";
1178 $flags .= "--tlsauthtype SRP ";
1179 $flags .= "--tlsuser jsmith ";
1180 $flags .= "--tlspassword abc ";
1195 return -1;
1226 $pid = -1;
1234 return -1;
1238 return -1;
1262 $pid = -1;
1283 unlink($verifylog) if(-f $verifylog);
1285 my $flags = "--max-time $server_response_maxtime ";
1286 $flags .= "--silent ";
1287 $flags .= "--verbose ";
1288 $flags .= "--globoff ";
1289 $flags .= "-u 'curltest:curltest' ";
1302 return -1;
1319 my $took = int(0.5+time()-$time);
1344 unlink($verifylog) if(-f $verifylog);
1346 my $flags = "--max-time $server_response_maxtime ";
1347 $flags .= "--silent ";
1348 $flags .= "--verbose ";
1349 $flags .= "--globoff ";
1350 $flags .= "--upload-file - ";
1363 return -1;
1380 my $took = int(0.5+time()-$time);
1399 # and 'httptls' is used for non-stunnel https test servers.
1425 while($count--) {
1477 my $exe = "$perl $srcdir/http2-server.pl";
1478 my $verbose_flag = "--verbose ";
1493 unlink($pidfile) if(-f $pidfile);
1499 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1500 $flags .= "--connect $HOSTIP:$HTTPPORT ";
1507 my $aflags = "--port $port $flags";
1546 my $verbose_flag = "--verbose ";
1576 unlink($pidfile) if(-f $pidfile);
1582 $flags .= "--gopher " if($proto eq "gopher");
1583 $flags .= "--connect $HOSTIP " if($alt eq "proxy");
1585 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1586 $flags .= "--portfile $portfile ";
1587 $flags .= "--id $idnum " if($idnum > 1);
1589 $flags .= "--unix-socket '$port_or_path' ";
1591 $flags .= "--ipv$ipvnum --port 0 ";
1593 $flags .= "--srcdir \"$TESTDIR/..\"";
1647 # the https-proxy runs as https2
1668 unlink($pidfile) if(-f $pidfile);
1676 $flags .= "--verbose " if($debugprotocol);
1677 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1678 $flags .= "--id $idnum " if($idnum > 1);
1679 $flags .= "--ipv$ipvnum --proto $proto ";
1680 $flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
1681 $flags .= "--stunnel \"$stunnel\" --srcdir \"$srcdir\" ";
1683 $flags .= "--connect $GOPHERPORT";
1686 $flags .= "--connect $HTTPPORT";
1689 # for HTTPS-proxy we connect to the HTTP proxy
1690 $flags .= "--connect $HTTPPROXYPORT";
1699 my $options = "$flags --accept $port";
1725 # start the non-stunnel HTTP TLS extensions capable server
1756 unlink($pidfile) if(-f $pidfile);
1762 $flags .= "--http ";
1763 $flags .= "--debug 1 " if($debugprotocol);
1764 $flags .= "--priority NORMAL:+SRP ";
1765 $flags .= "--srppasswd $srcdir/certs/srp-verifier-db ";
1766 $flags .= "--srppasswdconf $srcdir/certs/srp-verifier-conf";
1772 my $allflags = "--port $port $flags";
1825 unlink($pidfile) if(-f $pidfile);
1831 $flags .= "--verbose " if($debugprotocol);
1832 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1833 $flags .= "--portfile \"$portfile\" ";
1834 $flags .= "--srcdir \"$srcdir\" --proto $proto ";
1835 $flags .= "--id $idnum " if($idnum > 1);
1836 $flags .= "--ipv$ipvnum --port 0 --addr \"$ip\"";
1944 unlink($pidfile) if(-f $pidfile);
1952 $flags .= "--verbose " if($debugprotocol);
1953 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
1954 $flags .= "--id $idnum " if($idnum > 1);
1955 $flags .= "--ipv$ipvnum --proto $proto ";
1956 $flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
1957 $flags .= "--stunnel \"$stunnel\" --srcdir \"$srcdir\" ";
1958 $flags .= "--connect $FTPPORT";
1966 my $options = "$flags --accept $port";
2028 unlink($pidfile) if(-f $pidfile);
2034 $flags .= "--verbose " if($debugprotocol);
2035 $flags .= "--pidfile \"$pidfile\" ".
2036 "--portfile \"$portfile\" ".
2037 "--logfile \"$logfile\" ";
2038 $flags .= "--id $idnum " if($idnum > 1);
2039 $flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
2110 unlink($pidfile) if(-f $pidfile);
2116 $flags .= "--verbose " if($debugprotocol);
2117 $flags .= "--pidfile \"$pidfile\" ".
2118 "--portfile \"$portfile\" ".
2119 "--logfile \"$logfile\" ";
2120 $flags .= "--id $idnum " if($idnum > 1);
2121 $flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
2190 unlink($pidfile) if(-f $pidfile);
2197 $flags .= "--verbose " if($verbose);
2198 $flags .= "--debugprotocol " if($debugprotocol);
2199 $flags .= "--pidfile \"$pidfile\" ";
2200 $flags .= "--id $idnum " if($idnum > 1);
2201 $flags .= "--ipv$ipvnum --addr \"$ip\" ";
2202 $flags .= "--user \"$USER\"";
2217 my $options = "$flags --sshport $port";
2236 # and performing a very simple remote command. This verification is
2271 ($SSHSRVMD5 !~ /^[a-f0-9]{32}$/i))
2314 unlink($pidfile) if(-f $pidfile);
2320 # start our MQTT server - on a random port!
2321 my $cmd="server/mqttd".exe_ext('SRV').
2322 " --port 0 ".
2323 " --pidfile $pidfile".
2324 " --portfile $portfile".
2325 " --config $FTPDCMD";
2374 unlink($pidfile) if(-f $pidfile);
2381 my $cmd="server/socksd".exe_ext('SRV').
2382 " --port 0 ".
2383 " --pidfile $pidfile".
2384 " --portfile $portfile".
2385 " --backend $HOSTIP".
2386 " --config $FTPDCMD";
2438 unlink($pidfile) if(-f $pidfile);
2444 $flags .= "--verbose 1 " if($debugprotocol);
2445 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
2446 $flags .= "--id $idnum " if($idnum > 1);
2447 $flags .= "--srcdir \"$srcdir\" ";
2448 $flags .= "--host $HOSTIP";
2454 my $aflags = "--port $port $flags";
2510 unlink($pidfile) if(-f $pidfile);
2516 $flags .= "--verbose 1 " if($debugprotocol);
2517 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
2518 $flags .= "--id $idnum " if($idnum > 1);
2519 $flags .= "--srcdir \"$srcdir\" ";
2520 $flags .= "--host $HOSTIP";
2526 my $aflags = "--port $port $flags";
2582 unlink($pidfile) if(-f $pidfile);
2588 $flags .= "--verbose 1 " if($debugprotocol);
2589 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
2590 $flags .= "--id $idnum " if($idnum > 1);
2591 $flags .= "--srcdir \"$srcdir\"";
2597 my $aflags = "--port $port $flags";
2729 # Single shot non-stunnel HTTP TLS extensions capable server
2758 my @handles = `$handle $dir -accepteula -nobanner`;
2760 if($handle =~ /^(\S+)\s+pid:\s+(\d+)\s+type:\s+(\w+)\s+([0-9A-F]+):\s+(.+)\r\r/) {
2765 system("taskkill.exe -f -fi \"IMAGENAME eq $1\" -fi \"PID eq $2\" >nul 2>&1");
2787 if(-d "$dir/$file") {
2829 logmsg "FAIL: $testnum - $testname - $subject\n";
2837 $feature{"c-ares"} = $has_cares;
2838 $feature{"alt-svc"} = $has_altsvc;
2845 $feature{"GSS-API"} = $has_gssapi;
2847 $feature{"https-proxy"} = $has_httpsproxy;
2868 $feature{"threaded-resolver"} = $has_threadedres;
2869 $feature{"TLS-SRP"} = $has_tls_srp;
2873 $feature{"unix-sockets"} = $has_unix;
2888 $feature{"HTTP-auth"} = 1;
2893 $feature{"shuffle-dns"} = 1;
2895 $feature{"verbose-strings"} = 1;
2918 my $versioncmd="$CURL --version 1>$curlverout 2>$curlvererr";
2954 # Win32-style path.
2958 $has_mingw = 1 if ($curl =~ /-pc-mingw32/);
2998 $resolver="c-ares";
3011 # Generate a "proto-ipv6" version of each protocol to match the
3012 # IPv6 <server> name and a "proto-unix" to match the variant which
3015 push @protocols, map(("$_-ipv6", "$_-unix"), @protocols);
3017 # 'http-proxy' is used in test cases to do CONNECT through
3018 push @protocols, 'http-proxy';
3026 # built with memory tracking support (--enable-curldebug)
3030 # curl was built with --enable-debug
3079 if($feat =~ /GSS-API/i) {
3080 # GSS-API enabled
3101 if($feat =~ /TLS-SRP/i) {
3102 # TLS-SRP enabled
3109 if($feat =~ /alt-svc/i) {
3110 # alt-svc enabled
3129 if($feat =~ /HTTPS-proxy/) {
3132 # 'https-proxy' is used as "server" so consider it a protocol
3133 push @protocols, 'https-proxy';
3140 # Test harness currently uses a non-stunnel server in order to
3141 # run HTTP TLS-SRP tests required when curl is built with https
3142 # protocol support and TLS-SRP feature enabled. For convenience
3150 if($_ =~ /^https(-ipv6|)$/) {
3157 push @protocols, 'httptls-ipv6';
3165 if ($versretval == -1) {
3183 if(-r "../lib/curl_config.h") {
3197 my $cmd = "server/sws".exe_ext('SRV')." --version";
3206 $cmd = "server/sockfilt".exe_ext('SRV')." --version";
3216 my $cmd = "server/sws".exe_ext('SRV')." --version";
3223 "TrackMemory feature (--enable-curldebug)";
3226 open(M, "$CURL -M 2>&1|");
3228 if($s =~ /built-in manual was disabled at build-time/) {
3237 $has_shared = `sh $CURLCONFIG --built-shared`;
3241 my $hosttype=join(' ', runclientoutput("uname -a"));
3261 logmsg sprintf("%s", $http_ipv6?"HTTP-IPv6 ":"");
3262 logmsg sprintf("%s", $http_unix?"HTTP-unix ":"");
3263 logmsg sprintf("%s\n", $ftp_ipv6?"FTP-IPv6 ":"");
3266 $run_event_based?"event-based ":"");
3274 logmsg sprintf("* HTTP-Unix:%s\n", $HTTPUNIXPATH);
3356 if ($sshdid && $sshdid =~ /OpenSSH-Windows/) {
3368 # used for time-out tests and that would work on most hosts as these
3388 $d =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
3397 $d =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
3403 $d =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
3420 if(($$thing =~ /^HTTP\/(1.1|1.0|2) [1-5][^\x0d]*\z/) ||
3421 (($$thing =~ /^[a-z0-9_-]+: [^\x0d]*\z/i) &&
3489 # 'prepro' processes the input array and replaces %-variables in the array
3708 unlink($FTPDCMD) if(-f $FTPDCMD);
3788 my @o = `$cmd 2>log/precheck-$testnum`;
3814 return -1;
3919 $cmd="-";
3925 # create (possibly-empty) files before starting the test
3934 return -1;
3952 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
3953 #We may slap on --output!
3955 ($cmdhash{'option'} && $cmdhash{'option'} =~ /force-output/)) {
3956 $out=" --output $CURLOUT ";
3997 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-include/)) {
3998 $inc = " --include";
4002 if($cmdhash{'option'} && ($cmdhash{'option'} =~ /binary-trace/)) {
4003 $cmdargs .= "--trace log/trace$testnum ";
4006 $cmdargs .= "--trace-ascii log/trace$testnum ";
4008 $cmdargs .= "--trace-time ";
4010 $cmdargs .= "--test-event ";
4011 $fail_due_event_based--;
4015 $cmdargs .= " --proxy $proxy_address ";
4034 if(! -f $CMDLINE) {
4037 return -1;
4045 # with --db-attach=yes or --vgdb=yes.
4051 return -1;
4057 my $stdinfile="$LOGDIR/stdin-for-$testnum";
4081 $valgrindcmd .= "--quiet --leak-check=yes ";
4082 $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
4083 # $valgrindcmd .= "--gen-suppressions=all ";
4084 $valgrindcmd .= "--num-callers=16 ";
4110 print GDBCMD "source $gdbinit\n" if -e $gdbinit;
4121 "$gdb --directory $LIBDIR $DBGCURL -x $LOGDIR/gdbcmd");
4124 my $GDBW = ($gdbxwin) ? "-w" : "";
4125 runclient("$gdb --directory $LIBDIR $DBGCURL $GDBW -x $LOGDIR/gdbcmd");
4146 if(-r "core") {
4155 logmsg "running gdb for post-mortem analysis:\n";
4159 runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
4172 while((-f $SERVERLOGS_LOCK) && $lockretry--) {
4186 # gnutls-serv also lacks this synchronization mechanism, so gnutls-serv
4294 $ok .= "-"; # stdout not checked
4342 $ok .= "-"; # stderr not checked
4397 $ok .= "-"; # protocol not checked
4410 $ok .= "-"; # data not checked
4434 $ok .= "-"; # upload not checked
4487 $ok .= "-"; # protocol not checked
4504 return -1;
4542 $ok .= ($outputok) ? "o" : "-"; # output checked or not
4544 # accept multiple comma-separated error codes
4570 if(! -f $memdump) {
4597 $ok .= "-"; # memory not checked
4626 logmsg "FAIL: $testnum - $testname - valgrind\n";
4642 $ok .= "-"; # skipped
4646 $ok .= "-"; # valgrind not checked
4648 # add 'E' for event-based
4649 $ok .= $evbased ? "E" : "-";
4656 my $sofar= time()-$start;
4658 my $estleft = $esttotal - $sofar;
4662 my $took = $timevrfyend{$testnum} - $timeprepini{$testnum};
4666 logmsg sprintf("OK (%-3d out of %-3d, %s, took %.3fs, %s)\n",
4670 logmsg "PASS: $testnum - $testname\n";
4722 unlink($pidfile) if(-f $pidfile);
4737 $what =~ s/[^a-z0-9\/-]//g;
4740 if($what =~ /^(ftp|gopher|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
4761 elsif($what eq "ftp-ipv6") {
4762 if($torture && $run{'ftp-ipv6'} &&
4764 stopserver('ftp-ipv6');
4766 if(!$run{'ftp-ipv6'}) {
4769 return "failed starting FTP-IPv6 server";
4771 logmsg sprintf("* pid ftp-ipv6 => %d %d\n", $pid,
4773 $run{'ftp-ipv6'}="$pid $pid2";
4792 elsif($what eq "gopher-ipv6") {
4793 if($torture && $run{'gopher-ipv6'} &&
4796 stopserver('gopher-ipv6');
4798 if(!$run{'gopher-ipv6'}) {
4802 return "failed starting GOPHER-IPv6 server";
4804 logmsg sprintf("* pid gopher-ipv6 => %d %d\n", $pid,
4806 $run{'gopher-ipv6'}="$pid $pid2";
4836 elsif($what eq "http-proxy") {
4837 if($torture && $run{'http-proxy'} &&
4840 stopserver('http-proxy');
4842 if(!$run{'http-proxy'}) {
4846 return "failed starting HTTP-proxy server";
4848 logmsg sprintf ("* pid http-proxy => %d %d\n", $pid, $pid2)
4850 $run{'http-proxy'}="$pid $pid2";
4853 elsif($what eq "http-ipv6") {
4854 if($torture && $run{'http-ipv6'} &&
4856 stopserver('http-ipv6');
4858 if(!$run{'http-ipv6'}) {
4862 return "failed starting HTTP-IPv6 server";
4864 logmsg sprintf("* pid http-ipv6 => %d %d\n", $pid, $pid2)
4866 $run{'http-ipv6'}="$pid $pid2";
4883 elsif($what eq "rtsp-ipv6") {
4884 if($torture && $run{'rtsp-ipv6'} &&
4886 stopserver('rtsp-ipv6');
4888 if(!$run{'rtsp-ipv6'}) {
4891 return "failed starting RTSP-IPv6 server";
4893 logmsg sprintf("* pid rtsp-ipv6 => %d %d\n", $pid, $pid2)
4895 $run{'rtsp-ipv6'}="$pid $pid2";
5001 elsif($what eq "https-proxy") {
5003 # we can't run https-proxy tests without stunnel
5006 if($runcert{'https-proxy'} &&
5007 ($runcert{'https-proxy'} ne $certfile)) {
5009 stopserver('https-proxy');
5012 # we front the http-proxy with stunnel so we need to make sure the
5014 my $f = startservers("http-proxy");
5019 if(!$run{'https-proxy'}) {
5023 return "failed starting HTTPS-proxy (stunnel)";
5025 logmsg sprintf("* pid https-proxy => %d %d\n", $pid, $pid2)
5027 $run{'https-proxy'}="$pid $pid2";
5032 # for now, we can't run http TLS-EXT tests without gnutls-serv
5033 return "no gnutls-serv";
5036 !responsive_httptls_server($verbose, "IPv4")) {
5041 runhttptlsserver($verbose, "IPv4");
5043 return "failed starting HTTPTLS server (gnutls-serv)";
5050 elsif($what eq "httptls-ipv6") {
5052 # for now, we can't run http TLS-EXT tests without gnutls-serv
5053 return "no gnutls-serv";
5055 if($torture && $run{'httptls-ipv6'} &&
5057 stopserver('httptls-ipv6');
5059 if(!$run{'httptls-ipv6'}) {
5063 return "failed starting HTTPTLS-IPv6 server (gnutls-serv)";
5065 logmsg sprintf("* pid httptls-ipv6 => %d %d\n", $pid, $pid2)
5067 $run{'httptls-ipv6'}="$pid $pid2";
5085 elsif($what eq "tftp-ipv6") {
5086 if($torture && $run{'tftp-ipv6'} &&
5088 stopserver('tftp-ipv6');
5090 if(!$run{'tftp-ipv6'}) {
5094 return "failed starting TFTP-IPv6 server";
5096 printf("* pid tftp-ipv6 => %d %d\n", $pid, $pid2) if($verbose);
5097 $run{'tftp-ipv6'}="$pid $pid2";
5130 elsif($what eq "http-unix") {
5131 if($torture && $run{'http-unix'} &&
5133 stopserver('http-unix');
5135 if(!$run{'http-unix'}) {
5140 return "failed starting HTTP-unix server";
5142 logmsg sprintf("* pid http-unix => %d %d\n", $pid, $pid2)
5144 $run{'http-unix'}="$pid $pid2";
5209 for(my $i = scalar(@what) - 1; $i >= 0; $i--) {
5216 if($server =~ /^(httptls)(\+)(ext|srp)(\d*)(-ipv6|)$/) {
5218 $tlsext = uc("TLS-${3}");
5238 # runtimestats displays test-suite run time statistics
5263 $timesrvrtot += $timesrvrend{$testnum} - $timesrvrini{$testnum};
5265 (($timetoolini{$testnum} - $timeprepini{$testnum}) -
5266 ($timesrvrend{$testnum} - $timesrvrini{$testnum}));
5267 $timetooltot += $timetoolend{$testnum} - $timetoolini{$testnum};
5268 $timelocktot += $timesrvrlog{$testnum} - $timetoolend{$testnum};
5269 $timevrfytot += $timevrfyend{$testnum} - $timesrvrlog{$testnum};
5270 $timetesttot += $timevrfyend{$testnum} - $timeprepini{$testnum};
5272 $timesrvrend{$testnum} - $timesrvrini{$testnum}, $testnum);
5274 ($timetoolini{$testnum} - $timeprepini{$testnum}) -
5275 ($timesrvrend{$testnum} - $timesrvrini{$testnum}), $testnum);
5277 $timetoolend{$testnum} - $timetoolini{$testnum}, $testnum);
5279 $timesrvrlog{$testnum} - $timetoolend{$testnum}, $testnum);
5281 $timevrfyend{$testnum} - $timesrvrlog{$testnum}, $testnum);
5283 $timevrfyend{$testnum} - $timeprepini{$testnum}, $testnum);
5313 logmsg "-time- test\n";
5314 logmsg "------ ----\n";
5316 last if((not $fullstats) && (not $counter--));
5323 logmsg "-time- test\n";
5324 logmsg "------ ----\n";
5326 last if((not $fullstats) && (not $counter--));
5333 logmsg "-time- test\n";
5334 logmsg "------ ----\n";
5336 last if((not $fullstats) && (not $counter--));
5343 logmsg "-time- test\n";
5344 logmsg "------ ----\n";
5346 last if((not $fullstats) && (not $counter--));
5353 logmsg "-time- test\n";
5354 logmsg "------ ----\n";
5356 last if((not $fullstats) && (not $counter--));
5363 logmsg "-time- test\n";
5364 logmsg "------ ----\n";
5366 last if((not $fullstats) && (not $counter--));
5379 if(@ARGV && $ARGV[-1] eq '$TFLAGS') {
5385 my $fromnum=-1;
5388 if ($ARGV[0] eq "-v") {
5392 elsif ($ARGV[0] eq "-c") {
5397 elsif ($ARGV[0] eq "-vc") {
5407 elsif ($ARGV[0] eq "-d") {
5411 elsif($ARGV[0] eq "-e") {
5415 elsif($ARGV[0] eq "-f") {
5416 # force - run the test case even if listed in DISABLED
5419 elsif($ARGV[0] eq "-E") {
5441 elsif ($ARGV[0] eq "-g") {
5445 elsif ($ARGV[0] eq "-gw") {
5450 elsif($ARGV[0] eq "-s") {
5454 elsif($ARGV[0] eq "-am") {
5455 # automake-style output
5459 elsif($ARGV[0] eq "-n") {
5463 elsif ($ARGV[0] eq "-R") {
5467 elsif($ARGV[0] =~ /^-t(.*)/) {
5476 elsif($ARGV[0] =~ /--shallow=(\d+)/) {
5482 elsif($ARGV[0] =~ /--repeat=(\d+)/) {
5483 # Repeat-run the given tests this many times
5486 elsif($ARGV[0] =~ /--seed=(\d+)/) {
5487 # Set a fixed random seed (used for -R and --shallow)
5490 elsif($ARGV[0] eq "-a") {
5494 elsif($ARGV[0] eq "-o") {
5496 if ($ARGV[0] =~ /^(\w+)=([\w.:\/\[\]-]+)$/) {
5500 die "Failed to parse '-o $ARGV[0]'. May contain unexpected characters.\n";
5503 elsif($ARGV[0] eq "-p") {
5506 elsif($ARGV[0] eq "-P") {
5511 elsif($ARGV[0] eq "-L") {
5516 elsif($ARGV[0] eq "-l") {
5520 elsif($ARGV[0] eq "-k") {
5524 elsif($ARGV[0] eq "-r") {
5538 elsif($ARGV[0] eq "-rf") {
5552 elsif($ARGV[0] eq "-rm") {
5556 elsif(($ARGV[0] eq "-h") || ($ARGV[0] eq "--help")) {
5560 -a continue even if a test fails
5561 -am automake style output PASS/FAIL: [number] [name]
5562 -c path use this curl executable
5563 -d display server debug info
5564 -e event-based execution
5565 -E file load the specified file to exclude certain tests
5566 -f forcibly run even if disabled
5567 -g run the test case with gdb
5568 -gw run the test case with gdb as a windowed application
5569 -h this help text
5570 -k keep stdout and stderr files present after tests
5571 -L path require an additional perl library file to replace certain functions
5572 -l list all test case names/descriptions
5573 -n no valgrind
5574 -o variable=value set internal variable to the specified value
5575 -P proxy use the specified proxy
5576 -p print log file contents when a test fails
5577 -R scrambled order (uses the random seed, see --seed)
5578 -r run time statistics
5579 -rf full run time statistics
5580 -rm force removal of files by killing locking processes (Windows only)
5581 -s short output
5582 --seed=[num] set the random seed to a fixed number
5583 --shallow=[num] randomly makes the torture tests "thinner"
5584 -t[N] torture (simulate function failures); N means fail Nth function
5585 -v verbose output
5586 -vc path use this curl only to verify the existing servers
5603 $fromnum = -1;
5613 $fromnum = -1;
5617 $fromnum = -1;
5626 elsif($ARGV[0] =~ /^([-[{a-zA-Z].*)/) {
5641 open(C, "$CURL --version 2>/dev/null|");
5665 # since valgrind 2.1.x, '--tool' option is mandatory
5667 runclient("valgrind --help 2>&1 | grep -- --tool > /dev/null 2>&1");
5669 $valgrind_tool="--tool=memcheck";
5675 $valgrind="../libtool --mode=execute $valgrind";
5679 # valgrind 3 renamed the --logfile option to --log-file!!!
5680 my $ver=join(' ', runclientoutput("valgrind --version"));
5682 $ver =~ s/[^0-9.]//g;
5687 $valgrind_logfile="--log-file";
5702 $gdb = "../libtool --mode=execute gdb";
5758 if(! -f "$srcdir/data/test$n") {
5759 print STDERR "WARNING! Non-existing test $n in $file!\n";
5780 my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
5787 $_ =~ s/[a-z\/\.]*//g;
5805 if (-e "$TESTDIR/test$_") {
5869 $tailskip = $tailtotal - $tailshow;
5872 for($tailskip .. $tailtotal-1) {
5898 if((-d "$LOGDIR/$log") || (! -s "$LOGDIR/$log")) {
5947 # The main test-loop
6001 logmsg "\n - abort tests\n";
6012 my $sofar = time() - $start;
6062 $log_line .= " and ".($c-$max)." more";