From: Dan Fandrich Date: Thu, 27 Apr 2023 17:02:32 +0000 (-0700) Subject: runtests: reduce package exports after refactoring X-Git-Tag: curl-8_1_0~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b71a0c3ec9a14f1bc55e17108a6a2bacbb620f35;p=thirdparty%2Fcurl.git runtests: reduce package exports after refactoring 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 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 9121d8ff43..9ad0a8f08a 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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; diff --git a/tests/servers.pm b/tests/servers.pm index 7c4b36778e..32f66552a4 100644 --- a/tests/servers.pm +++ b/tests/servers.pm @@ -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";