}
use pathhelp qw(exe_ext);
use Cwd qw(getcwd);
+use testutil qw(
+ shell_quote
+);
#######################################################################
# paths
our $pwd = getcwd(); # current working directory
our $srcdir = $ENV{'srcdir'} || '.'; # root of the test source code
-our $perlcmd="$^X";
-our $perl="$perlcmd -I. -I$srcdir"; # invoke perl like this
+our $perlcmd=shell_quote($^X);
+our $perl="$perlcmd -I. " . shell_quote("-I$srcdir"); # invoke perl like this
our $LOGDIR="log"; # root of the log directory; this will be different for
# each runner in multiprocess mode
our $LIBDIR="./libtest";
# VCURL is handy to set to the system one when the one you
# just built hangs or crashes and thus prevent verification
# the path to the script that analyzes the memory debug output file
-our $memanalyze="$perl $srcdir/memanalyze.pl";
+our $memanalyze="$perl " . shell_quote("$srcdir/memanalyze.pl");
our $valgrind; # path to valgrind, or empty if disabled
our $bundle = 0; # use bundled server, libtest, unit binaries
our $dev_null = ($^O eq 'MSWin32' ? 'NUL' : '/dev/null');
logmsg
runclient
runclientoutput
+ shell_quote
);
my $ip = $HOSTIP;
my $ipvnum = 4;
my $idnum = 1;
- my $exe = "$perl $srcdir/http-server.pl";
+ my $exe = "$perl " . shell_quote("$srcdir/http-server.pl");
my $verbose_flag = "--verbose ";
my $keepalive_secs = 30; # forwarded to sws, was 5 by default which
# led to pukes in CI jobs
my $proto="http/2";
my $ipvnum = 4;
my $idnum = 0;
- my $exe = "$perl $srcdir/http2-server.pl";
+ my $exe = "$perl " . shell_quote("$srcdir/http2-server.pl");
my $verbose_flag = "--verbose ";
my $server = servername_id($proto, $ipvnum, $idnum);
my $proto="http/3";
my $ipvnum = 4;
my $idnum = 0;
- my $exe = "$perl $srcdir/http3-server.pl";
+ my $exe = "$perl " . shell_quote("$srcdir/http3-server.pl");
my $verbose_flag = "--verbose ";
my $server = servername_id($proto, $ipvnum, $idnum);
my $port = getfreeport($ipvnum);
my $options = "$flags --accept $port";
- my $cmd = "$perl $srcdir/secureserver.pl $options";
+ my $cmd = "$perl " . shell_quote("$srcdir/secureserver.pl") . " " . $options;
my ($httpspid, $pid2) = startnew($cmd, $pidfile, 15, 0);
if($httpspid <= 0 || !pidexists($httpspid)) {
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --port 0 --addr \"$ip\"";
- my $cmd = "$perl $srcdir/ftpserver.pl $flags";
+ my $cmd = "$perl " . shell_quote("$srcdir/ftpserver.pl") . " " . $flags;
my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
if($ftppid <= 0 || !pidexists($ftppid)) {
my $port = getfreeport($ipvnum);
my $options = "$flags --accept $port";
- my $cmd = "$perl $srcdir/secureserver.pl $options";
+ my $cmd = "$perl " . shell_quote("$srcdir/secureserver.pl") . " " . $options;
my ($protospid, $pid2) = startnew($cmd, $pidfile, 15, 0);
if($protospid <= 0 || !pidexists($protospid)) {
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
- my $cmd = "$perl $srcdir/tftpserver.pl $flags";
+ my $cmd = "$perl " . shell_quote("$srcdir/tftpserver.pl") . " " . $flags;
my ($tftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
if($tftppid <= 0 || !pidexists($tftppid)) {
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
- my $cmd = "$perl $srcdir/rtspserver.pl $flags";
+ my $cmd = "$perl " . shell_quote("$srcdir/rtspserver.pl") . " " . $flags;
my ($rtsppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
if($rtsppid <= 0 || !pidexists($rtsppid)) {
my $options = "$flags --sshport $port";
- my $cmd = "$perl $srcdir/sshserver.pl $options";
+ my $cmd = "$perl " . shell_quote("$srcdir/sshserver.pl") . " " . $options;
my ($sshpid, $pid2) = startnew($cmd, $pidfile, 60, 0);
# on loaded systems sshserver start up can take longer than the