]> Cypherpunks repositories - gostls13.git/commitdiff
os/signal: special-case test settle time on the solaris-amd64-oraclerel builder
authorBryan C. Mills <bcmills@google.com>
Wed, 15 Apr 2020 14:56:22 +0000 (10:56 -0400)
committerBryan C. Mills <bcmills@google.com>
Wed, 15 Apr 2020 20:12:13 +0000 (20:12 +0000)
This is an attempt to distinguish between a dropped signal and
general builder slowness.

The previous attempt (increasing the settle time to 250ms) still
resulted in a timeout:
https://build.golang.org/log/dd62939f6d3b512fe3e6147074a9c6db1144113f

For #33174

Change-Id: I79027e91ba651f9f889985975f38c7b01d82f634
Reviewed-on: https://go-review.googlesource.com/c/go/+/228266
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/signal/signal_test.go

index 50e21d4e643a6bdc9f8df1a29b94efa3ddbd9903..f0e06b879504ce375282d6e3d57ab276d0605b31 100644 (file)
@@ -27,10 +27,25 @@ import (
 // on heavily loaded systems.
 //
 // The current value is set based on flakes observed in the Go builders.
-var settleTime = 250 * time.Millisecond
+var settleTime = 100 * time.Millisecond
 
 func init() {
-       if s := os.Getenv("GO_TEST_TIMEOUT_SCALE"); s != "" {
+       if testenv.Builder() == "solaris-amd64-oraclerel" {
+               // The solaris-amd64-oraclerel builder has been observed to time out in
+               // TestNohup even with a 250ms settle time.
+               //
+               // Use a much longer settle time on that builder to try to suss out whether
+               // the test is flaky due to builder slowness (which may mean we need a
+               // longer GO_TEST_TIMEOUT_SCALE) or due to a dropped signal (which may
+               // instead need a test-skip and upstream bug filed against the Solaris
+               // kernel).
+               //
+               // This constant is chosen so as to make the test as generous as possible
+               // while still reliably completing within 3 minutes in non-short mode.
+               //
+               // See https://golang.org/issue/33174.
+               settleTime = 11 * time.Second
+       } else if s := os.Getenv("GO_TEST_TIMEOUT_SCALE"); s != "" {
                if scale, err := strconv.Atoi(s); err == nil {
                        settleTime *= time.Duration(scale)
                }