tstest/natlab/vmtest: use short paths for Unix sockets

macOS limits Unix socket paths to 104 bytes. The Go test TempDir
path (e.g. /var/folders/.../TestDirectConnection...679197086/001/)
easily exceeds that, causing "bind: invalid argument". Create a
short /tmp/vmtest* directory for all socket files (vnet, QMP,
dgram) so the paths stay well under the limit on every platform.

Updates #13038

Change-Id: I721d24561d1766aaa964692bc77f40a131aa9455
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2026-05-11 20:46:18 -07:00
committed by Brad Fitzpatrick
parent f4c5613156
commit 758ebe9839
2 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ func (e *Env) startCloudQEMU(n *Node) error {
}
logPath := filepath.Join(e.tempDir, n.name+".log")
qmpSock := filepath.Join(e.tempDir, n.name+"-qmp.sock")
qmpSock := filepath.Join(e.sockDir, n.name+"-qmp.sock")
args := []string{
"-machine", "q35",