diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2023-04-27 10:02:32 -0700 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2023-05-05 00:45:43 -0700 |
commit | b71a0c3ec9a14f1bc55e17108a6a2bacbb620f35 (patch) | |
tree | 2f3233f0b2181c3814e638298a88cc1a41d7f75a | |
parent | 9fdad9dea1cca430146169a2d619db5e96b28e36 (diff) | |
download | curl-b71a0c3ec9a14f1bc55e17108a6a2bacbb620f35.tar.gz |
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
-rwxr-xr-x | tests/runtests.pl | 13 | ||||
-rw-r--r-- | tests/servers.pm | 38 |
2 files changed, 15 insertions, 36 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 9121d8ff4..9ad0a8f08 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 7c4b36778..32f66552a 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"; |