2019-02-18 03:44:41 +00:00
|
|
|
module golang.zx2c4.com/wireguard
|
2018-10-09 16:11:36 +00:00
|
|
|
|
device: make test setup more robust
Picking two free ports to use for a test is difficult.
The free port we selected might no longer be free when we reach
for it a second time.
On my machine, this failure mode led to failures approximately
once per thousand test runs.
Since failures are rare, and threading through and checking for
all possible errors is complicated, fix this with a big hammer:
Retry if either device fails to come up.
Also, if you accidentally pick the same port twice, delightful confusion ensues.
The handshake failures manifest as crypto errors, which look scary.
Again, fix with retries.
To make these retries easier to implement, use testing.T.Cleanup
instead of defer to close devices. This requires Go 1.14.
Update go.mod accordingly. Go 1.13 is no longer supported anyway.
With these fixes, 'go test -race' ran 100,000 times without failure.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-12-09 03:23:56 +00:00
|
|
|
go 1.14
|
2019-04-12 23:58:53 +00:00
|
|
|
|
2018-10-09 16:11:36 +00:00
|
|
|
require (
|
2020-11-27 12:13:45 +00:00
|
|
|
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
|
2020-11-18 13:24:00 +00:00
|
|
|
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
|
2020-11-27 12:13:45 +00:00
|
|
|
golang.org/x/sys v0.0.0-20201126233918-771906719818
|
2018-10-09 16:11:36 +00:00
|
|
|
)
|