Browse Source

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.
Dan Fandrich 10 months ago
parent
commit
1177c741b9
5 changed files with 13 additions and 12 deletions
  1. 4 3
      tests/ftpserver.pl
  2. 2 2
      tests/globalconfig.pm
  3. 2 2
      tests/runner.pm
  4. 1 1
      tests/server/sws.c
  5. 4 4
      tests/servers.pm

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

+ 2 - 2
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

+ 2 - 2
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')) {

+ 1 - 1
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 */

+ 4 - 4
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);