go/packages: fix data race in TestCgoNoSyntax

CL 332350 introduced a race to exported.Config.Mode when it parallelized
this test. Revert the call to t.Parallel.

Change-Id: Ifd4b6c4037ee30e8b3f55dc69d4f9f3f09a89185
Reviewed-on: https://go-review.googlesource.com/c/tools/+/333509
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Rob Findley 2021-07-09 10:43:12 -04:00 committed by Robert Findley
parent 69948257bd
commit 2583041a9d
1 changed files with 0 additions and 2 deletions

View File

@ -1905,8 +1905,6 @@ func testCgoNoSyntax(t *testing.T, exporter packagestest.Exporter) {
for _, mode := range modes {
mode := mode
t.Run(fmt.Sprint(mode), func(t *testing.T) {
t.Parallel()
exported.Config.Mode = mode
pkgs, err := packages.Load(exported.Config, "golang.org/fake/c")
if err != nil {