]> Cypherpunks.ru repositories - gostls13.git/commit
testing: fix deadlock with t.Parallel in testing seed corpus
authorKatie Hockman <katie@golang.org>
Wed, 22 Dec 2021 15:34:55 +0000 (10:34 -0500)
committerKatie Hockman <katie@golang.org>
Thu, 6 Jan 2022 22:12:11 +0000 (22:12 +0000)
commitb9cae6f78f129bb3f1b3293da5375040f5c4f356
treec12964f62c18faa2b375a6f3831cdbf1c79534c4
parent61014f00f24df8b144d9d235fe3e25ff64b96521
testing: fix deadlock with t.Parallel in testing seed corpus

The c.startParallel channel on the testContext is stuck
in t.Parallel() because c.running starts at 1 for the main
fuzz parent test, and is causing a deadlock because it is
never released. It would normally be released by tRunner,
but needs to instead be released by fRunner instead for fuzz
tests.

Fixes #50217

Change-Id: I2d010e9adddfd8e8321ff2f9dd2e43daf46c128f
Reviewed-on: https://go-review.googlesource.com/c/go/+/374054
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/testdata/script/test_fuzz_parallel.txt
src/testing/fuzz.go