]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: reduce package exports after refactoring
authorDan Fandrich <dan@coneharvesters.com>
Thu, 27 Apr 2023 17:02:32 +0000 (10:02 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 5 May 2023 07:45:43 +0000 (00:45 -0700)
Some recent refactoring made these export no longer necessary. Also,
stop displaying the Unix socket paths at startup since there will soon
be many of them and they're not that interesting.

Ref: #10818

tests/runtests.pl
tests/servers.pm

index 9121d8ff438b35331213f4d8b9c31b254a38f548..9ad0a8f08ac797e54a71a1ac446fd7533fc52219 100755 (executable)
@@ -778,17 +778,6 @@ sub displayserverfeatures {
     logmsg sprintf("%s", $http_ipv6?"HTTP-IPv6 ":"");
     logmsg sprintf("%s", $http_unix?"HTTP-unix ":"");
     logmsg sprintf("%s\n", $ftp_ipv6?"FTP-IPv6 ":"");
-
-    if($verbose) {
-        if($feature{"unix-sockets"}) {
-            logmsg "* Unix socket paths:\n";
-            if($http_unix) {
-                logmsg sprintf("*   HTTP-Unix:%s\n", $HTTPUNIXPATH);
-                logmsg sprintf("*   Socks-Unix:%s\n", $SOCKSUNIXPATH);
-            }
-        }
-    }
-
     logmsg "***************************************** \n";
 }
 
@@ -1476,7 +1465,7 @@ sub singletest_check {
     my @socksprot = getpart("verify", "socks");
     if(@socksprot) {
         # Verify the sent SOCKS proxy details
-        my @out = loadarray($SOCKSIN);
+        my @out = loadarray("$logdir/$SOCKSIN");
         $res = compare($testnum, $testname, "socks", \@out, \@socksprot);
         if($res) {
             return -1;
index 7c4b36778e69eb4a82feffff82857afedba35723..32f66552a455c1d540fbc1053d076c3bf8dfa646 100644 (file)
@@ -37,16 +37,7 @@ BEGIN {
     our @EXPORT = (
         # variables
         qw(
-            $HOSTIP
-            $HOST6IP
-            $HTTPUNIXPATH
-            $sshdid
-            $SSHSRVMD5
-            $SSHSRVSHA256
-            $SOCKSUNIXPATH
             $SOCKSIN
-            $USER
-            $ftpchecktime
             $err_unexpected
             $debugprotocol
             $stunnel
@@ -142,21 +133,21 @@ my $serverstartretries=10; # number of times to attempt to start server;
 my $portrange = 999;       # space from which to choose a random port
                            # don't increase without making sure generated port
                            # numbers will always be valid (<=65535)
+my $HOSTIP="127.0.0.1";    # address on which the test server listens
+my $HOST6IP="[::1]";       # address on which the test server listens
+my $HTTPUNIXPATH;          # HTTP server Unix domain socket path
+my $SOCKSUNIXPATH;         # socks server Unix domain socket path
+my $SSHSRVMD5 = "[uninitialized]";    # MD5 of ssh server public key
+my $SSHSRVSHA256 = "[uninitialized]"; # SHA256 of ssh server public key
+my $USER;                  # name of the current user
+my $sshdid;                # for socks server, ssh daemon version id
+my $ftpchecktime=1;        # time it took to verify our test FTP server
 
 # Variables shared with runtests.pl
-our $HOSTIP="127.0.0.1";   # address on which the test server listens
-our $HOST6IP="[::1]";      # address on which the test server listens
-our $HTTPUNIXPATH; # HTTP server Unix domain socket path
-our $sshdid;      # for socks server, ssh daemon version id
-our $SSHSRVMD5 = "[uninitialized]"; # MD5 of ssh server public key
-our $SSHSRVSHA256 = "[uninitialized]"; # SHA256 of ssh server public key
-our $SOCKSUNIXPATH;  # socks server Unix domain socket path
-our $SOCKSIN; # what curl sent to the SOCKS proxy
-our $USER; # name of the current user
-our $ftpchecktime=1; # time it took to verify our test FTP server
+our $SOCKSIN="socksd-request.log"; # what curl sent to the SOCKS proxy
 our $err_unexpected; # error instead of warning on server unexpectedly alive
-our $debugprotocol; # nonzero for verbose server logs
-our $stunnel; # path to stunnel command
+our $debugprotocol;  # nonzero for verbose server logs
+our $stunnel;        # path to stunnel command
 
 
 #######################################################################
@@ -179,7 +170,6 @@ sub checkcmd {
 #######################################################################
 # Initialize configuration variables
 sub initserverconfig {
-    $SOCKSIN="$LOGDIR/socksd-request.log"; # what curl sent to the SOCKS proxy
     $SOCKSUNIXPATH = "$PIDDIR/socks.sock"; # SOCKS server Unix domain socket path
     $HTTPUNIXPATH = "$PIDDIR/http.sock";   # HTTP server Unix domain socket path
     $stunnel = checkcmd("stunnel4") || checkcmd("tstunnel") || checkcmd("stunnel");
@@ -2014,7 +2004,7 @@ sub runsocksserver {
     if($is_unix) {
         $cmd="server/socksd".exe_ext('SRV').
             " --pidfile $pidfile".
-            " --reqfile $SOCKSIN".
+            " --reqfile $LOGDIR/$SOCKSIN".
             " --logfile $logfile".
             " --unix-socket $SOCKSUNIXPATH".
             " --backend $HOSTIP".
@@ -2024,7 +2014,7 @@ sub runsocksserver {
             " --port 0 ".
             " --pidfile $pidfile".
             " --portfile $portfile".
-            " --reqfile $SOCKSIN".
+            " --reqfile $LOGDIR/$SOCKSIN".
             " --logfile $logfile".
             " --backend $HOSTIP".
             " --config $FTPDCMD";