]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: make TestStackGrowth a serial test
authorAustin Clements <austin@google.com>
Tue, 11 Jul 2017 13:26:01 +0000 (09:26 -0400)
committerAustin Clements <austin@google.com>
Tue, 11 Jul 2017 18:32:56 +0000 (18:32 +0000)
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 <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Elias Naur <elias.naur@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/stack_test.go

index 485e327c4105913d2a7941f0ed4c2008425a9fcb..25e8f77da4c07a23759290dba5082d147bb306eb 100644 (file)
@@ -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