From 8d9aa6d6e12cb35b074dd66da454795c8808a41b Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 2 Dec 2025 15:53:29 +0100 Subject: [PATCH] tests/servers: put unix-domain-path inside LOGDIR Change Unix domain socket paths from `/tmp/curl-socksd-` to `/drive/path/to/LOGDIR/PIDDIR/*-uds` to avoid having to create and delete them before use. Also to use a path which remains an absolute one while passed from MSYS2 Perl to native Windows curl tool and test server via the command-line, and keep pointing to the same location, fixing: ``` === Start of file commands.log ../src/curl.exe -q --output log/3/curl1468.out --include --trace-ascii log/3/trace1468 --trace-time http://this.is.a.host.name:64405/1468 --proxy socks5h://localhost/tmp/curl-socksd-YnbvRo98 [...] === End of file commands.log === Start of file socks2_server.log [...] 14:11:54.597968 Listening on Unix socket D:/a/_temp/msys64/tmp/curl-socksd-YnbvRo98 ``` Ref: https://github.com/curl/curl/actions/runs/19896583933/job/57028545111?pr=19812 The curl tool is pending #19825 to fix accepting an absolute unix domain socket path on Windows. Assisted-by: Viktor Szakats Closes #19810 --- tests/servers.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/servers.pm b/tests/servers.pm index db4b3757b5..f23d897fdd 100644 --- a/tests/servers.pm +++ b/tests/servers.pm @@ -195,14 +195,8 @@ use File::Temp qw/ tempfile/; ####################################################################### # Initialize configuration variables sub initserverconfig { - my ($fh, $socks) = tempfile("curl-socksd-XXXXXXXX", TMPDIR => 1); - close($fh); - unlink($socks); - my ($f2, $http) = tempfile("curl-http-XXXXXXXX", TMPDIR => 1); - close($f2); - unlink($http); - $SOCKSUNIXPATH = $socks; # SOCKS Unix domain socket - $HTTPUNIXPATH = $http; # HTTP Unix domain socket + $SOCKSUNIXPATH = "$pwd/$LOGDIR/$PIDDIR/socks-uds"; # SOCKS Unix domain socket + $HTTPUNIXPATH = "$pwd/$LOGDIR/$PIDDIR/http-uds"; # HTTP Unix domain socket $stunnel = checkcmd("stunnel4") || checkcmd("tstunnel") || checkcmd("stunnel"); # get the name of the current user -- 2.47.3