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.
This commit is contained in:
Dan Fandrich 2023-06-14 15:11:40 -07:00
parent 72c5bb14e7
commit 1177c741b9
5 changed files with 13 additions and 12 deletions

View File

@ -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+-\/=\*. ]+)\" (.*)/) {

View File

@ -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

View File

@ -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')) {

View File

@ -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 */

View File

@ -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);