edge tests: ListenPurge tests bind a unix socket under t.TempDir() and fail when TMPDIR is long (sun_path 107 bytes) Issue open
Migrated from github.com/carlosframework/platform issue #308, opened 2026-08-26. GitHub issues are closed for this repo; see AGENTS.md, "Work is tracked on amadan, not GitHub".
Still outstanding: Two ListenPurge tests bind a unix socket under t.TempDir() and fail when TMPDIR is long.
---
TestListenPurgeCloseImmediatelyAfterOpenRemovesSocketFile and TestListenPurgeCloseRefusesRequestsOnAlreadyEstablishedConnections (internal/edge/purgetest.go:114,144) put instance.sock under t.TempDir(). With the test's own long name in the path, anything but a very short TMPDIR pushes the socket path past Linux's 107-byte `sunpath and listen unix … bind: invalid argument fails the whole package. Seen 2026-08-26 with TMPDIR=/home/paulca/.cache/tmp and even TMPDIR=/tmp/claude-1001/t` (110 bytes). The gate is otherwise unaffected.
Fix: os.MkdirTemp("/tmp", "purge") (or a shortened per-test dir) for these sockets, as the fleet/tunnel e2e tests already avoid the problem, and a t.Skip with the path length in the message when it still can't fit.
Separately noticed in the same run: TestBackhaulSlotHeldForStreamLife's test server logs http: panic serving …: close of closed channel from homemap_test.go:1392 — recovered by net/http so the test passes, but a test handler double-closing a channel is worth a look.