]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] testing: fix data race between parallel subtests
authorChangkun Ou <hi@changkun.us>
Fri, 28 Feb 2020 20:53:38 +0000 (21:53 +0100)
committerIan Lance Taylor <iant@golang.org>
Fri, 20 Mar 2020 19:05:17 +0000 (19:05 +0000)
commitab9d037401dba9cd82e7eba87f04ae896709ef62
treea7c1c7eae95d0fef559819be8a61fbc1648f8178
parent564c76a268b75f56d6f465b82fba7f6fb929fd70
[release-branch.go1.14] testing: fix data race between parallel subtests

This CL fixes a race condition if there are two subtests, and
one finishing but the other is panicking.

For #37551
Fixes #37959

Change-Id: Ic33963eb338aec228964b95f7c34a0d207b91e00
Reviewed-on: https://go-review.googlesource.com/c/go/+/221322
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 93a9561b23b782244a7c5d77efe71f57dee8c4a5)
Reviewed-on: https://go-review.googlesource.com/c/go/+/224257
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Changkun Ou <euryugasaki@gmail.com>
src/cmd/go/testdata/script/test_main_panic.txt [new file with mode: 0644]
src/testing/testing.go