diff options
| author | Bryan C. Mills <bcmills@google.com> | 2021-12-09 11:55:20 -0500 |
|---|---|---|
| committer | Bryan Mills <bcmills@google.com> | 2021-12-13 16:42:31 +0000 |
| commit | 4b3d8d1a390a51ea6a1b3f66ef9d56ef7203bbe7 (patch) | |
| tree | faa6991261baf219df06070126015395847bb1aa /src/encoding/binary | |
| parent | b55cbbb9e76969d67fbc6e264a584ad18c2f95fa (diff) | |
| download | go-4b3d8d1a390a51ea6a1b3f66ef9d56ef7203bbe7.tar.xz | |
net: create unix sockets in unique directories
This change applies the same transformation as in CL 366774,
but to the net package.
testUnixAddr was using os.CreateTemp to obtain a unique socket path,
but then calling os.Remove on that path immediately. Since the
existence of the file is what guarantees its uniqueness, that could
occasionally result in testUnixAddr returning the same path for two
calls, causing the tests using those paths to fail — especially if
they are the same test or are run in parallel.
Instead, we now create a unique, short temp directory for each call,
and use a path within that directory for the socket address.
For #34611
Change-Id: I8e13b606abce2479a0305f7aeecf5d54c449a032
Reviewed-on: https://go-review.googlesource.com/c/go/+/370694
Trust: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/encoding/binary')
0 files changed, 0 insertions, 0 deletions
