1
0
mirror of https://github.com/golang/go synced 2024-11-23 15:40:06 -07:00
go/src/crypto
Russ Cox 623d653db7 crypto/tls: deflake localPipe in tests
The localPipe implementation assumes that every successful net.Dial
results in exactly one successful listener.Accept. I don't believe this
is guaranteed by essentially any operating system. For this test, we're
seeing flakes on dragonfly (#29583).

But see also #19519, flakes due to the same assumption on FreeBSD
and macOS in package net's own tests.

This CL rewrites localPipe to try a few times to get a matching pair
of connections on the dial and accept side.

Fixes #29583.

Change-Id: Idb045b18c404eae457f091df20456c5ae879a291
Reviewed-on: https://go-review.googlesource.com/c/go/+/184157
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-29 13:17:15 +00:00
..
aes crypto/aes: replace broken extenal link to FIPS 197 2019-02-04 18:22:49 +00:00
cipher syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS 2019-05-24 09:38:37 +00:00
des cmd/go: further reduce init work 2019-03-31 10:49:55 +00:00
dsa
ecdsa crypto/ecdsa: implement ecdsa on s390x for P256/P384/P521 using KDSA instruction 2019-05-24 08:16:32 +00:00
ed25519 crypto/ed25519: promote from golang.org/x/crypto/ed25519 2019-05-06 23:23:45 +00:00
elliptic all: shorten some tests 2019-05-22 12:54:00 +00:00
hmac crypto/hmac: rename CheckHMAC to ValidHMAC in package docs 2018-11-17 21:29:23 +00:00
internal
md5 all: simplify code using "gofmt -s -w" 2019-05-06 22:19:22 +00:00
rand syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS 2019-05-24 09:38:37 +00:00
rc4 crypto/rc4: remove false guarantees from Reset docs and deprecate it 2019-02-22 17:05:17 +00:00
rsa all: remove PEM-encoded private keys from tests 2019-05-21 20:03:55 +00:00
sha1 crypto/sha*: replace putUint{32,64} helpers 2019-05-23 16:16:26 +00:00
sha256 crypto/sha*: replace putUint{32,64} helpers 2019-05-23 16:16:26 +00:00
sha512 crypto/sha*: replace putUint{32,64} helpers 2019-05-23 16:16:26 +00:00
subtle crypto/subtle: normalize constant time ops docs 2019-01-22 19:40:30 +00:00
tls crypto/tls: deflake localPipe in tests 2019-06-29 13:17:15 +00:00
x509 crypto/x509: normalize and expand docs of Parse and Marshal functions 2019-06-20 19:38:48 +00:00
crypto.go
issue21104_test.go