From: Austin Clements Date: Tue, 11 Jul 2017 13:26:01 +0000 (-0400) Subject: runtime: make TestStackGrowth a serial test X-Git-Tag: go1.9rc1~79 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=286599f27026f5c4001f1da25b35aa1243f51d08;p=gostls13.git runtime: make TestStackGrowth a serial test TestStackGrowth is currently a parallel test. However, it depends on a 20 second timeout, which is already dubious in a parallel test, and became really problematic on slow builders when runtime.GC switched to triggering concurrent GC instead of STW GC. Before that change, the test spent much of its time in STW GC, so it wasn't *really* parallel. After that change, it was competing with all of the other parallel tests and GC likely started taking ~4 times longer. On most builders the whole test runs in well under a second, but on the slow builders that was enough to push it over the 20 second timeout. Fix this by making the test serial. Updates #19381 (probably fixes it, but we'll have to wait and see). Change-Id: I21af7cf543ab07f1ec1c930bfcb355b0df75672d Reviewed-on: https://go-review.googlesource.com/48110 Run-TryBot: Austin Clements TryBot-Result: Gobot Gobot Reviewed-by: Elias Naur Reviewed-by: Brad Fitzpatrick --- diff --git a/src/runtime/stack_test.go b/src/runtime/stack_test.go index 485e327c41..25e8f77da4 100644 --- a/src/runtime/stack_test.go +++ b/src/runtime/stack_test.go @@ -72,7 +72,9 @@ func TestStackMem(t *testing.T) { // Test stack growing in different contexts. func TestStackGrowth(t *testing.T) { - t.Parallel() + // Don't make this test parallel as this makes the 20 second + // timeout unreliable on slow builders. (See issue #19381.) + var wg sync.WaitGroup // in a normal goroutine