From: Dan Fandrich Date: Wed, 14 Jun 2023 22:11:40 +0000 (-0700) Subject: runtests: rename server command file X-Git-Tag: curl-8_2_0~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1177c741b9d1f00c46f5594d191180befc38fc1d;p=thirdparty%2Fcurl.git runtests: rename server command file The name ftpserver.cmd was historical and has been used for more than ftp for many years now. Rename it to plain server.cmd to reduce confusion. --- diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 26f79591ee..35fa384ff2 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -79,6 +79,7 @@ use pathhelp qw( ); use globalconfig qw( + $SERVERCMD $LOCKDIR ); @@ -93,7 +94,7 @@ my $proto = 'ftp'; # default server protocol my $srcdir; # directory where ftpserver.pl is located my $srvrname; # server name for presentation purposes my $cwd_testno; # test case numbers extracted from CWD command -my $testno = 0; # test case number (read from ftpserver.cmd) +my $testno = 0; # test case number (read from server.cmd) my $path = '.'; my $logdir = $path .'/log'; my $piddir; @@ -2799,10 +2800,10 @@ sub customize { %customcount = (); # %delayreply = (); # - open(my $custom, "<", "$logdir/ftpserver.cmd") || + open(my $custom, "<", "$logdir/$SERVERCMD") || return 1; - logmsg "FTPD: Getting commands from $logdir/ftpserver.cmd\n"; + logmsg "FTPD: Getting commands from $logdir/$SERVERCMD\n"; while(<$custom>) { if($_ =~ /REPLY \"([A-Z]+ [A-Za-z0-9+-\/=\*. ]+)\" (.*)/) { diff --git a/tests/globalconfig.pm b/tests/globalconfig.pm index 7280b93819..5aad483eb5 100644 --- a/tests/globalconfig.pm +++ b/tests/globalconfig.pm @@ -38,7 +38,6 @@ BEGIN { $automakestyle $CURL $CURLVERSION - $FTPDCMD $has_shared $LIBDIR $listonly @@ -53,6 +52,7 @@ BEGIN { $pwd $randseed $run_event_based + $SERVERCMD $SERVERIN $srcdir $TESTDIR @@ -106,7 +106,7 @@ our $PIDDIR = "server"; # root of the server directory with PID files our $SERVERIN="server.input"; # what curl sent the server our $PROXYIN="proxy.input"; # what curl sent the proxy our $MEMDUMP="memdump"; # file that the memory debugging creates -our $FTPDCMD="ftpserver.cmd"; # copy server instructions here +our $SERVERCMD="server.cmd"; # copy server instructions here # other config variables our @protocols; # array of lowercase supported protocol servers diff --git a/tests/runner.pm b/tests/runner.pm index a017d8c08a..5627b5517d 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -546,7 +546,7 @@ sub singletest_startservers { my ($testnum, $testtimings) = @_; # remove old test server files before servers are started/verified - unlink("$LOGDIR/$FTPDCMD"); + unlink("$LOGDIR/$SERVERCMD"); unlink("$LOGDIR/$SERVERIN"); unlink("$LOGDIR/$PROXYIN"); @@ -697,7 +697,7 @@ sub singletest_prepare { my @ftpservercmd = getpart("reply", "servercmd"); push @ftpservercmd, "Testnum $testnum\n"; # write the instructions to file - writearray("$LOGDIR/$FTPDCMD", \@ftpservercmd); + writearray("$LOGDIR/$SERVERCMD", \@ftpservercmd); # create (possibly-empty) files before starting the test for my $partsuffix (('', '1', '2', '3', '4')) { diff --git a/tests/server/sws.c b/tests/server/sws.c index 7babda75af..bf2c6f94ec 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -160,7 +160,7 @@ static char loglockfile[256]; #define RESPONSE_PROXY_DUMP "proxy.response" /* file in which additional instructions may be found */ -#define DEFAULT_CMDFILE "log/ftpserver.cmd" +#define DEFAULT_CMDFILE "log/server.cmd" const char *cmdfile = DEFAULT_CMDFILE; /* very-big-path support */ diff --git a/tests/servers.pm b/tests/servers.pm index 9c550a8cb3..d6f96f42b7 100644 --- a/tests/servers.pm +++ b/tests/servers.pm @@ -1150,7 +1150,7 @@ sub runhttpserver { $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" "; $flags .= "--logdir \"$LOGDIR\" "; $flags .= "--portfile $portfile "; - $flags .= "--config $LOGDIR/$FTPDCMD "; + $flags .= "--config $LOGDIR/$SERVERCMD "; $flags .= "--id $idnum " if($idnum > 1); if($ipvnum eq "unix") { $flags .= "--unix-socket '$port_or_path' "; @@ -1912,7 +1912,7 @@ sub runmqttserver { " --port 0 ". " --pidfile $pidfile". " --portfile $portfile". - " --config $LOGDIR/$FTPDCMD". + " --config $LOGDIR/$SERVERCMD". " --logfile $logfile". " --logdir $LOGDIR"; my ($sockspid, $pid2) = startnew($cmd, $pidfile, 30, 0); @@ -1973,7 +1973,7 @@ sub runsocksserver { " --logfile $logfile". " --unix-socket $SOCKSUNIXPATH". " --backend $HOSTIP". - " --config $LOGDIR/$FTPDCMD"; + " --config $LOGDIR/$SERVERCMD"; } else { $cmd="server/socksd".exe_ext('SRV'). " --port 0 ". @@ -1982,7 +1982,7 @@ sub runsocksserver { " --reqfile $LOGDIR/$SOCKSIN". " --logfile $logfile". " --backend $HOSTIP". - " --config $LOGDIR/$FTPDCMD"; + " --config $LOGDIR/$SERVERCMD"; } my ($sockspid, $pid2) = startnew($cmd, $pidfile, 30, 0);