go/src/runtime/testdata
Michael Anthony Knyszek 871d63fb73 runtime: call runtime.GC in several tests that disable GC
These tests disable GC because of the potential for a deadlock, but
don't consider that a GC could be in progress due to other tests. The
likelihood of this case was increased when the minimum heap size was
lowered during the Go 1.18 cycle. The issue was then mitigated by
CL 368137 but in theory is always a problem.

This change is intended specifically for #45867, but I just walked over
a whole bunch of other tests that don't take this precaution where it
seems like it could be relevant (some tests it's not, like the
UserForcedGC test, or testprogs where no other code has run before it).

Fixes #45867.

Change-Id: I6a1b4ae73e05cab5a0b2d2cce14126bd13be0ba5
Reviewed-on: https://go-review.googlesource.com/c/go/+/369747
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: David Chase <drchase@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-06 23:02:28 +00:00
..
testfaketime
testprog runtime: call runtime.GC in several tests that disable GC 2021-12-06 23:02:28 +00:00
testprogcgo runtime: drop cgoTraceback call assumptions from CgoPprof tests 2021-11-12 19:45:58 +00:00
testprognet
testwinlib
testwinlibsignal runtime: wait for Go runtime to initialize in Windows signal test 2021-05-21 13:21:00 +00:00
testwinsignal all: run gofmt 2021-03-15 21:49:19 +00:00