• Home
  • Raw
  • Download

Lines Matching +full:runner +full:- +full:before +full:- +full:script

21 # SPDX-License-Identifier: curl
30 # unmarshalled (in ipcrecv) before the desired function is called normally.
33 # before being returned to the caller.
35 package runner; package
113 # These may only be set *before* runner_init is called
115 our $valgrind_logfile="--log-file"; # the option name for valgrind >=3
116 our $valgrind_tool="--tool=memcheck";
126 my %oldenv; # environment variables before test is started
131 my $multiprocess; # nonzero with a separate test runner process
134 my $runnerr; # pipe that runner reads from
135 my $runnerw; # pipe that runner writes to
137 # per-runner variables, indexed by runner ID; these are used by controller only
153 # Initialize the runner and prepare it to run tests
154 # The runner ID returned by this function must be passed into the other
172 # Incorporate the $logdir into the random seed and re-seed the PRNG.
173 # This gives each runner a unique yet consistent seed which provides
174 # more unique port number selection in each runner, yet is deterministic
179 # create pipes for communication with runner
198 print "Runner $thisrunnerid starting\n" if($verbose);
200 # Here we are the child (runner).
218 print "Runner $thisrunnerid exiting\n" if($verbose);
295 # 'prepro' processes the input array and replaces %-variables in the array
322 # only if this was showing before we can allow the alternative
345 if(!$plvl--) {
418 # memanalyze -v is our friend, get the number of allocations made
420 my @out = `$memanalyze -v "$LOGDIR/$MEMDUMP"`;
434 my $discard = scalar(@ttests) - $shallow;
444 $discard--;
457 # --shallow can undefine them
483 $valgrindcmd .= "--quiet --leak-check=yes ";
484 $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
485 # $valgrindcmd .= "--gen-suppressions=all ";
486 $valgrindcmd .= "--num-callers=16 ";
505 if(-r "core") {
516 logmsg "FAIL: torture $testnum - valgrind\n";
545 logmsg `$memanalyze -l "$LOGDIR/$MEMDUMP"`;
551 " invoke with \"-t$limit\" to repeat this single case.\n";
586 # remove old test server files before servers are started/verified
601 $error = -1;
607 $error = -2;
609 $error = -1;
710 my @o = `$cmd 2> $LOGDIR/precheck-$testnum`;
745 # create (possibly-empty) files before starting the test
753 return -1;
764 if(join("/", @parts[0..$nparts-1]) eq $LOGDIR) {
803 $cmd="-";
811 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
812 #We may slap on --output!
814 ($cmdhash{'option'} && $cmdhash{'option'} =~ /force-output/)) {
815 $out=" --output $CURLOUT ";
849 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-include/)) {
850 $inc = " --include";
854 if($cmdhash{'option'} && ($cmdhash{'option'} =~ /binary-trace/)) {
855 $cmdargs .= "--trace $LOGDIR/trace$testnum ";
858 $cmdargs .= "--trace-ascii $LOGDIR/trace$testnum ";
860 $cmdargs .= "--trace-time ";
862 $cmdargs .= "--test-event ";
863 $fail_due_event_based--;
867 $cmdargs .= " --proxy $proxy_address ";
886 if(! -f $CMDLINE) {
888 return (-1, 0, 0, "", "", 0);
895 return (-1, 0, 0, "", "", 0);
901 # with --db-attach=yes or --vgdb=yes.
908 my $stdinfile="$LOGDIR/stdin-for-$testnum";
913 chomp($stdintest[-1]);
923 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-q/)) {
924 $CMDLINE .= " -q";
931 $valgrindcmd .= "--quiet --leak-check=yes ";
932 $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
933 # $valgrindcmd .= "--gen-suppressions=all ";
934 $valgrindcmd .= "--num-callers=16 ";
960 print $gdbcmd "source $gdbinit\n" if -e $gdbinit;
979 … "$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " -x $LOGDIR/gdbcmd");
983 my $GDBW = ($gdbxwin) ? "-w" : "";
984 runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR/gdbcmd");
989 print "runs lldb -- $CURL $cmdargs\n";
990 runclient("lldb -- $CURL $cmdargs");
1011 if(-r "core") {
1020 logmsg "running gdb for post-mortem analysis:\n";
1024 …runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch " . shell_quote($DBGCURL) . " core "…
1032 # So, if the lock file exists the script waits here a certain amount
1045 while((@locks = logslocked()) && $lockretry--) {
1060 # gnutls-serv also lacks this synchronization mechanism, so gnutls-serv
1109 return -1;
1135 # ignore any error here--if there were one, it would have been
1166 $error = -1;
1175 # Returns 0=success, -1=skippable failure, -2=permanent error,
1189 return (-2, clearlogs());
1202 return (-2, clearlogs(), \%testtimings);
1268 # The first argument is the function reference, the second is the runner ID
1269 # Returns 0 on success, -1 on error writing to runner
1276 my $gv = $cv->GV;
1278 unshift @_, $gv->NAME;
1286 # Runner has likely died
1287 return -1;
1301 # The first return value is the runner ID or undef on error
1309 # Runner is likely dead and closed the pipe
1318 # Runner is likely dead and closed the pipe
1327 # First argument is runner ID
1334 # Returns runner ID if a response from an async call is ready or error
1347 $idbyfileno{$fd} = $p; # save the runner ID for each pipe fd
1354 # Wait for any pipe from any runner to be ready
1376 # Cleanly abort and exit the runner
1379 print "Controller is gone: runner $$ for $LOGDIR exiting\n";
1386 # Receive an IPC call in the runner and execute it
1389 # Returns 0 if more IPC calls are expected or 1 if the runner should exit
1481 # Shut down this runner