1
0
mirror of https://github.com/golang/go synced 2024-09-30 01:24:33 -06:00
go/src/crypto
Ziheng Liu 42f8199290 all: fix incorrect channel and API usage in some unit tests
This CL changes some unit test functions, making sure that these tests (and goroutines spawned during test) won't block.
Since they are just test functions, I use one CL to fix them all. I hope this won't cause trouble to reviewers and can save time for us.
There are three main categories of incorrect logic fixed by this CL:
1. Use testing.Fatal()/Fatalf() in spawned goroutines, which is forbidden by Go's document.
2. Channels are used in such a way that, when errors or timeout happen, the test will be blocked and never return.
3. Channels are used in such a way that, when errors or timeout happen, the test can return but some spawned goroutines will be leaked, occupying resource until all other tests return and the process is killed.

Change-Id: I3df931ec380794a0cf1404e632c1dd57c65d63e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/219380
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-27 19:04:17 +00:00
..
aes crypto/aes,crypto/cipher: add asm implementation for aes-gcm on ppc64le 2019-09-24 16:15:36 +00:00
cipher crypto/cipher: require non-zero nonce size for AES-GCM 2020-02-24 15:45:26 +00:00
des
dsa all: fix a bunch of misspellings 2019-11-15 21:04:43 +00:00
ecdsa crypto/ecdsa: add SignASN1, VerifyASN1 2020-02-21 19:38:55 +00:00
ed25519 crypto/ed25519: outline NewKeyFromSeed and Sign 2019-09-24 10:23:40 +00:00
elliptic crypto/elliptic: document the Name and names of each curve 2020-02-11 00:59:47 +00:00
hmac
internal
md5 all: remove nacl (part 3, more amd64p32) 2019-10-10 22:38:38 +00:00
rand all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
rc4
rsa all: change some function documentation to be more idiomatic 2019-07-28 18:09:57 +00:00
sha1 all: remove nacl (part 3, more amd64p32) 2019-10-10 22:38:38 +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
tls all: fix incorrect channel and API usage in some unit tests 2020-02-27 19:04:17 +00:00
x509 crypto/x509: use new ecdsa.VerifyASN1 API 2020-02-26 15:50:14 +00:00
crypto.go
issue21104_test.go