• 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;
705 my @o = `$cmd 2> $LOGDIR/precheck-$testnum`;
740 # create (possibly-empty) files before starting the test
748 return -1;
759 if(join("/", @parts[0..$nparts-1]) eq $LOGDIR) {
798 $cmd="-";
806 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
807 #We may slap on --output!
809 ($cmdhash{'option'} && $cmdhash{'option'} =~ /force-output/)) {
810 $out=" --output $CURLOUT ";
844 if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-include/)) {
845 $inc = " --include";
849 if($cmdhash{'option'} && ($cmdhash{'option'} =~ /binary-trace/)) {
850 $cmdargs .= "--trace $LOGDIR/trace$testnum ";
853 $cmdargs .= "--trace-ascii $LOGDIR/trace$testnum ";
855 $cmdargs .= "--trace-time ";
857 $cmdargs .= "--test-event ";
858 $fail_due_event_based--;
862 $cmdargs .= " --proxy $proxy_address ";
881 if(! -f $CMDLINE) {
883 return (-1, 0, 0, "", "", 0);
890 return (-1, 0, 0, "", "", 0);
896 # with --db-attach=yes or --vgdb=yes.
903 my $stdinfile="$LOGDIR/stdin-for-$testnum";
908 chomp($stdintest[-1]);
923 $valgrindcmd .= "--quiet --leak-check=yes ";
924 $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
925 # $valgrindcmd .= "--gen-suppressions=all ";
926 $valgrindcmd .= "--num-callers=16 ";
952 print $gdbcmd "source $gdbinit\n" if -e $gdbinit;
971 … "$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " -x $LOGDIR/gdbcmd");
975 my $GDBW = ($gdbxwin) ? "-w" : "";
976 runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR/gdbcmd");
981 print "runs lldb -- $CURL $cmdargs\n";
982 runclient("lldb -- $CURL $cmdargs");
1003 if(-r "core") {
1012 logmsg "running gdb for post-mortem analysis:\n";
1016 …runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch " . shell_quote($DBGCURL) . " core "…
1024 # So, if the lock file exists the script waits here a certain amount
1037 while((@locks = logslocked()) && $lockretry--) {
1052 # gnutls-serv also lacks this synchronization mechanism, so gnutls-serv
1101 return -1;
1127 # ignore any error here--if there were one, it would have been
1158 $error = -1;
1167 # Returns 0=success, -1=skippable failure, -2=permanent error,
1181 return (-2, clearlogs());
1194 return (-2, clearlogs(), \%testtimings);
1260 # The first argument is the function reference, the second is the runner ID
1261 # Returns 0 on success, -1 on error writing to runner
1268 my $gv = $cv->GV;
1270 unshift @_, $gv->NAME;
1278 # Runner has likely died
1279 return -1;
1293 # The first return value is the runner ID or undef on error
1301 # Runner is likely dead and closed the pipe
1310 # Runner is likely dead and closed the pipe
1319 # First argument is runner ID
1326 # Returns runner ID if a response from an async call is ready or error
1339 $idbyfileno{$fd} = $p; # save the runner ID for each pipe fd
1346 # Wait for any pipe from any runner to be ready
1368 # Cleanly abort and exit the runner
1371 print "Controller is gone: runner $$ for $LOGDIR exiting\n";
1378 # Receive an IPC call in the runner and execute it
1381 # Returns 0 if more IPC calls are expected or 1 if the runner should exit
1473 # Shut down this runner