Subject: Re: [PATCH v2] t5564: use a short path for the SOCKS proxy socket

From: Jeff King <[email-masked]>
Date: Fri, 1 May 2026 02:47:46 -0400

On Wed, Apr 29, 2026 at 08:22:54AM +0000, Johannes Schindelin via GitGitGadget wrote:

> From: Johannes Schindelin <[email-masked]>
> 
> The SOCKS proxy test introduced in 0ca365c2ed4 (http: do not ignore
> proxy path, 2024-08-02) creates a Unix domain socket in
> `$TRASH_DIRECTORY`. When the trash directory path is long (e.g.
> when running from a deeply nested worktree), the socket path can
> exceed the 108-character limit for `struct sockaddr_un.sun_path` on
> Linux, causing the test to fail with "Path length ... is longer
> than maximum supported length (108)".
> 
> We cannot work around this using the chdir trick our own socket code
> employs, because both sides of the connection are outside our control:
> the socket is created by socks4-proxy.pl via Perl's IO::Socket::UNIX,
> and the client side is libcurl.
> 
> Use `mktemp -d` to create a unique temporary directory with a short
> path, and place the socket inside it. This avoids collisions between
> concurrent test runs (e.g. `--stress`) and tmpdir-race vulnerabilities
> that a static `/tmp` path would be susceptible to.

Thanks, this looks great to me (and thank you for fleshing out the
explanation in the commit message, too).

-Peff