Lines Matching +full:- +full:- +full:with +full:- +full:wolfssh
22 # SPDX-License-Identifier: curl
32 # $HOSTIP, $HOST6IP - Set to the address of the host running the test suite
33 # $CLIENTIP, $CLIENT6IP - Set to the address of the host running curl
34 # runclient, runclientoutput - Modify to copy all the files in the log/
47 # Note that even with these changes a number of tests will still fail (mainly
48 # to do with cookies, those that set environment variables, or those that
53 # Finally, to properly support -g and -n, checktestcmd needs to change
56 # fixed. As long as the -g option is never given, and the -n is always
68 # usually set by the Makefile, but for out-of-tree builds with direct
108 my $CURLCONFIG="../curl-config"; # curl-config from current build
125 my $args; # command-line arguments
127 my $uname_release = `uname -r`;
145 my $passedign; # tests passed with results ignored
285 # to prevent them to interfere with our testing!
320 my $cmd = "\"$ENV{'NGHTTPX'}\" -v 2>$dev_null";
332 # If a non-default $TESTDIR is being used there may not be any
362 if(-d "$dir/$file") {
389 my $file1="$logdir/check-generated";
390 my $file2="$logdir/check-expected";
397 $l =~ s/([^\x20-\x7f])/sprintf "%%%02x", ord $1/eg;
408 $l =~ s/([^\x20-\x7f])/sprintf "%%%02x", ord $1/eg;
413 my @out = `diff -u $file2 $file1 2>$dev_null`;
416 @out = `diff -c $file2 $file1 2>$dev_null`;
424 # compare test results with the expected output, we might filter off
446 logmsg "FAIL: $testnum - $testname - $subject\n";
453 # Numeric-sort words in a string
466 # Generate a "proto-ipv6" version of each protocol to match the
467 # IPv6 <server> name and a "proto-unix" to match the variant which
470 push @protocols, map(("$_-ipv6", "$_-unix"), @protocols);
472 # 'http-proxy' is used in test cases to do CONNECT through
473 push @protocols, 'http-proxy';
482 # Information to do with servers is displayed in displayserverfeatures, after
497 my $versioncmd=shell_quote($CURL) . " --version 1>$curlverout 2>$curlvererr";
507 $DATE = strftime "%Y-%m-%d", gmtime($current_time);
513 open(my $disabledh, "-|", "server/disabled".exe_ext('TOOL'));
530 $CURLVERNUM =~ s/^([0-9.]+)(.*)/$1/; # leading dots and numbers
540 # Windows-style path.
556 elsif ($libcurl =~ /\srustls-ffi\b/i) {
590 $feature{"c-ares"} = 1;
591 $resolver="c-ares";
609 if ($libcurl =~ /libssh\/([0-9.]*)\//i) {
619 if ($libcurl =~ /wolfssh/i) {
620 $feature{"wolfssh"} = 1;
631 # built with memory tracking support (--enable-curldebug); may be disabled later
633 # curl was built with --enable-debug
659 # GSS-API enabled
660 $feature{"GSS-API"} = $feat =~ /GSS-API/i;
665 # TLS-SRP enabled
666 $feature{"TLS-SRP"} = $feat =~ /TLS-SRP/i;
669 # alt-svc enabled
670 $feature{"alt-svc"} = $feat =~ /alt-svc/i;
674 if(!$feature{"c-ares"}) {
676 $feature{"threaded-resolver"} = 1;
691 $feature{"HTTPS-proxy"} = $feat =~ /HTTPS-proxy/;
692 if($feature{"HTTPS-proxy"}) {
693 # 'https-proxy' is used as "server" so consider it a protocol
694 push @protocols, 'https-proxy';
698 # Thread-safe init
701 $feature{"asyn-rr"} = $feat =~ /asyn-rr/;
704 # Test harness currently uses a non-stunnel server in order to
705 # run HTTP TLS-SRP tests required when curl is built with https
706 # protocol support and TLS-SRP feature enabled. For convenience
711 if($feature{"TLS-SRP"}) {
714 if($_ =~ /^https(-ipv6|)$/) {
721 push @protocols, 'httptls-ipv6';
730 if ($versretval == -1) {
731 logmsg "command failed with: \n";
735 logmsg sprintf("command died with signal %d, and %s coredump.\n",
739 logmsg sprintf("command exited with value %d \n", $versretval >> 8);
748 if(-r "../lib/curl_config.h") {
766 my $cmd = "server/sws".exe_ext('SRV')." --version";
774 $cmd = "server/sockfilt".exe_ext('SRV')." --version";
784 my $cmd = "server/sws".exe_ext('SRV')." --version";
789 open(my $manh, "-|", shell_quote($CURL) . " -M 2>&1");
791 if($s =~ /built-in manual was disabled at build-time/) {
802 $feature{"nghttpx-h3"} = !!$nghttpx_h3;
811 $feature{"HTTP-auth"} = 1;
813 $feature{"form-api"} = 1;
817 $feature{"shuffle-dns"} = 1;
819 $feature{"verbose-strings"} = 1;
821 $feature{"headers-api"} = 1;
823 $feature{"large-time"} = 1;
824 $feature{"large-size"} = 1;
825 $feature{"sha512-256"} = 1;
826 $feature{"local-http"} = servers::localhttp();
827 $feature{"codeset-utf8"} = lc(langinfo(CODESET())) eq "utf-8";
835 $has_shared = `sh $CURLCONFIG --built-shared`;
841 "TrackMemory feature (--enable-curldebug)";
846 my $hosttype=join(' ', runclientoutput("uname -a"));
867 if($feature{"TrackMemory"} && $feature{"threaded-resolver"}) {
874 $run_duphandle?"test-duphandle ":"",
875 $run_event_based?"event-based ":"",
882 $feature{"TrackMemory"} = $feature{"TrackMemory"} && !$feature{"threaded-resolver"};
895 logmsg sprintf("%s", $http_ipv6?"HTTP-IPv6 ":"");
896 logmsg sprintf("%s", $http_unix?"HTTP-unix ":"");
897 logmsg sprintf("%s\n", $ftp_ipv6?"FTP-IPv6 ":"");
962 # Register the test case with the CI runner
980 # Submit the test case result with the CI runner
1195 return -1;
1228 return -2;
1284 chomp($validstdout[-1]);
1293 return -1;
1298 $ok .= "-"; # stdout not checked
1333 chomp($validstderr[-1]);
1342 return -1;
1347 $ok .= "-"; # stderr not checked
1368 chomp($protocol[-1]);
1395 return -1;
1400 return -1;
1407 $ok .= "-"; # protocol not checked
1425 chomp($replycheckpart[-1]);
1440 chomp($reply[-1]);
1464 return -1;
1469 $ok .= "-"; # data not checked
1478 chomp($upload[-1]);
1500 chomp($upload[-1]);
1505 return -1;
1510 $ok .= "-"; # upload not checked
1523 chomp($proxyprot[-1]);
1547 return -1;
1554 $ok .= "-"; # proxy not checked
1587 return -1;
1620 chomp($outfile[-1]);
1626 return -1;
1632 $ok .= ($outputok) ? "o" : "-"; # output checked or not
1641 return -1;
1645 # accept multiple comma-separated error codes
1667 return -1;
1671 if(! -f "$logdir/$MEMDUMP") {
1674 logmsg "\n** ALERT! memory tracking with no output file?\n"
1676 $ok .= "-"; # problem with memory checking
1693 return -1;
1701 $ok .= "-"; # memory not checked
1711 if (-e $fname) {
1720 return -1;
1729 return -1;
1744 return -1;
1749 logmsg "FAIL: $testnum - $testname - valgrind\n";
1757 return -1;
1765 $ok .= "-"; # skipped
1769 $ok .= "-"; # valgrind not checked
1771 # add 'E' for event-based
1772 $ok .= $run_event_based ? "E" : "-";
1788 my $sofar= time()-$start;
1790 my $estleft = $esttotal - $sofar;
1794 my $took = $timevrfyend{$testnum} - $timeprepini{$testnum};
1798 logmsg sprintf("OK (%-3d out of %-3d, %s, took %.3fs, %s)\n",
1804 logmsg "PASS: $testnum - $testname\n";
1817 # asynchronous call is made that awaits a response. The function returns with
1842 return (-1, 0);
1857 return (-1, 0);
1881 # Register the test case with the CI environment
1887 return (-1, 0);
1896 return (-1, 0);
1900 if($error == -2) {
1917 # Submit the test case result with the CI environment
1933 return (-1, 0);
1942 return (-1, 0);
1946 if($error == -1) {
1950 # Submit the test case result with the CI environment
1957 elsif($error == -2) {
1960 # Submit the test case result with the CI environment
1969 # Submit the test case result with the CI environment
1985 if($error == -1) {
1987 # Submit the test case result with the CI environment
1994 elsif($error == -2) {
1997 # Submit the test case result with the CI environment
2009 # Submit the test case result with the CI environment
2021 # runtimestats displays test-suite run time statistics
2048 $timesrvrtot += $timesrvrend{$testnum} - $timesrvrini{$testnum};
2050 (($timetoolini{$testnum} - $timeprepini{$testnum}) -
2051 ($timesrvrend{$testnum} - $timesrvrini{$testnum}));
2052 $timetooltot += $timetoolend{$testnum} - $timetoolini{$testnum};
2053 $timelocktot += $timesrvrlog{$testnum} - $timetoolend{$testnum};
2054 $timevrfytot += $timevrfyend{$testnum} - $timesrvrlog{$testnum};
2055 $timetesttot += $timevrfyend{$testnum} - $timeprepini{$testnum};
2057 $timesrvrend{$testnum} - $timesrvrini{$testnum}, $testnum);
2059 ($timetoolini{$testnum} - $timeprepini{$testnum}) -
2060 ($timesrvrend{$testnum} - $timesrvrini{$testnum}), $testnum);
2062 $timetoolend{$testnum} - $timetoolini{$testnum}, $testnum);
2064 $timesrvrlog{$testnum} - $timetoolend{$testnum}, $testnum);
2066 $timevrfyend{$testnum} - $timesrvrlog{$testnum}, $testnum);
2068 $timevrfyend{$testnum} - $timeprepini{$testnum}, $testnum);
2098 logmsg "-time- test\n";
2099 logmsg "------ ----\n";
2101 last if((not $fullstats) && (not $counter--));
2108 logmsg "-time- test\n";
2109 logmsg "------ ----\n";
2111 last if((not $fullstats) && (not $counter--));
2118 logmsg "-time- test\n";
2119 logmsg "------ ----\n";
2121 last if((not $fullstats) && (not $counter--));
2128 logmsg "-time- test\n";
2129 logmsg "------ ----\n";
2131 last if((not $fullstats) && (not $counter--));
2138 logmsg "-time- test\n";
2139 logmsg "------ ----\n";
2141 last if((not $fullstats) && (not $counter--));
2148 logmsg "-time- test\n";
2149 logmsg "------ ----\n";
2151 last if((not $fullstats) && (not $counter--));
2188 # create $numrunners runners with minimum 1
2214 if(@ARGV && $ARGV[-1] eq '$TFLAGS') {
2223 my $fromnum=-1;
2226 if ($ARGV[0] eq "-v") {
2230 elsif ($ARGV[0] eq "-c") {
2235 elsif ($ARGV[0] eq "-vc") {
2245 elsif ($ARGV[0] eq "-ac") {
2250 elsif ($ARGV[0] eq "-bundle") {
2254 elsif ($ARGV[0] eq "-d") {
2258 elsif(($ARGV[0] eq "-e") || ($ARGV[0] eq "--test-event")) {
2262 elsif($ARGV[0] eq "--test-duphandle") {
2263 # run the tests with --test-duphandle
2266 elsif($ARGV[0] eq "-f") {
2267 # force - run the test case even if listed in DISABLED
2270 elsif($ARGV[0] eq "-E") {
2292 elsif ($ARGV[0] eq "-g") {
2293 # run this test with gdb
2296 elsif ($ARGV[0] eq "-gl") {
2297 # run this test with lldb
2300 elsif ($ARGV[0] eq "-gw") {
2301 # run this test with windowed gdb
2305 elsif($ARGV[0] eq "-s") {
2309 elsif($ARGV[0] eq "-am") {
2310 # automake-style output
2314 elsif($ARGV[0] eq "-n") {
2318 elsif($ARGV[0] eq "--no-debuginfod") {
2322 elsif ($ARGV[0] eq "-R") {
2326 elsif($ARGV[0] =~ /^-t(.*)/) {
2335 elsif($ARGV[0] =~ /--shallow=(\d+)/) {
2341 elsif($ARGV[0] =~ /--repeat=(\d+)/) {
2342 # Repeat-run the given tests this many times
2345 elsif($ARGV[0] =~ /--seed=(\d+)/) {
2346 # Set a fixed random seed (used for -R and --shallow)
2349 elsif($ARGV[0] eq "-a") {
2353 elsif($ARGV[0] eq "-o") {
2355 if ($ARGV[0] =~ /^(\w+)=([\w.:\/\[\]-]+)$/) {
2359 die "Failed to parse '-o $ARGV[0]'. May contain unexpected characters.\n";
2362 elsif($ARGV[0] eq "-p") {
2365 elsif($ARGV[0] eq "-P") {
2369 elsif($ARGV[0] eq "-L") {
2374 elsif($ARGV[0] eq "-l") {
2378 elsif($ARGV[0] =~ /^-j(.*)/) {
2386 elsif($ARGV[0] eq "-k") {
2390 elsif($ARGV[0] eq "-r") {
2405 elsif($ARGV[0] eq "-rf") {
2420 elsif($ARGV[0] eq "-rm") {
2424 elsif($ARGV[0] eq "-u") {
2428 elsif(($ARGV[0] eq "-h") || ($ARGV[0] eq "--help")) {
2432 -a continue even if a test fails
2433 -ac path use this curl only to talk to APIs (currently only CI test APIs)
2434 -am automake style output PASS/FAIL: [number] [name]
2435 -bundle use test bundles
2436 -c path use this curl executable
2437 -d display server debug info
2438 -e, --test-event event-based execution
2439 --test-duphandle duplicate handles before use
2440 -E file load the specified file to exclude certain tests
2441 -f forcibly run even if disabled
2442 -g run the test case with gdb
2443 -gw run the test case with gdb as a windowed application
2444 -h this help text
2445 -j[N] spawn this number of processes to run tests (default 0)
2446 -k keep stdout and stderr files present after tests
2447 -L path require an additional perl library file to replace certain functions
2448 -l list all test case names/descriptions
2449 -n no valgrind
2450 --no-debuginfod disable the valgrind debuginfod functionality
2451 -o variable=value set internal variable to the specified value
2452 -P proxy use the specified proxy
2453 -p print log file contents when a test fails
2454 -R scrambled order (uses the random seed, see --seed)
2455 -r run time statistics
2456 -rf full run time statistics
2457 -rm force removal of files by killing locking processes (Windows only)
2458 --repeat=[num] run the given tests this many times
2459 -s short output
2460 --seed=[num] set the random seed to a fixed number
2461 --shallow=[num] randomly makes the torture tests "thinner"
2462 -t[N] torture (simulate function failures); N means fail Nth function
2463 -u error instead of warning on server unexpectedly alive
2464 -v verbose output
2465 -vc path use this curl only to verify the existing servers
2482 $fromnum = -1;
2492 $fromnum = -1;
2496 $fromnum = -1;
2505 elsif($ARGV[0] =~ /^([-[{a-zA-Z].*)/) {
2523 open(my $curlvh, "-|", shell_quote($CURL) . " --version 2>$dev_null") ||
2548 # since valgrind 2.1.x, '--tool' option is mandatory
2552 runclient("valgrind --help 2>&1 | grep -- --tool >$dev_null 2>&1");
2559 # A shell script. This is typically when built with libtool,
2560 $valgrind="../libtool --mode=execute $valgrind";
2564 # valgrind 3 renamed the --logfile option to --log-file!!!
2567 my $ver=join(' ', runclientoutput("valgrind --version"));
2569 $ver =~ s/[^0-9.]//g;
2574 $valgrind_logfile="--logfile";
2587 # A shell script. This is typically when built with libtool,
2589 $gdb = "../libtool --mode=execute gdb";
2609 # Disable buffered logging with only one test job
2675 if(! -f "$srcdir/data/test$n") {
2676 print STDERR "WARNING! Non-existing test $n in $file!\n";
2701 my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
2704 $TESTCASES=""; # start with no test cases
2708 $_ =~ s/[a-z\/\.]*//g;
2725 if (-e "$TESTDIR/test$_") {
2790 $tailskip = $tailtotal - $tailshow;
2793 for($tailskip .. $tailtotal-1) {
2819 if((-d "$logdir/$log") || (! -s "$logdir/$log")) {
2880 # Display test name now--test will be completely skipped later
2904 # The main test-loop
2907 # - if the global abort flag is set, exit the loop; we are done
2908 # - if a runner is idle, start a new test on it
2909 # - if all runners are idle, exit the loop; we are done
2910 # - if a runner has a response for us, process the response
3021 logmsg "\n - abort tests\n";
3062 # the same test runner status as we give with a SIGUSR1. This will
3069 my $sofar = time() - $start;
3135 $log_line .= " and ".($c-$max)." more";
3169 testnumdetails("PASSED-IGNORED", $sorted);
3176 testnumdetails("FAIL-IGNORED", $sorted);