aboutsummaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorPaul E. Murphy <murp@ibm.com>2021-04-28 16:47:41 -0500
committerLynn Boger <laboger@linux.vnet.ibm.com>2021-05-04 17:37:39 +0000
commitda7496d84128be85a4db5b6fdf9029c48c867211 (patch)
tree4efae302f190fe151c8e8c16cc1ef926648c4d9f /src/os
parentd83baa1aa22d074b44d8b705e1d8dafa30ecceb1 (diff)
downloadgo-da7496d84128be85a4db5b6fdf9029c48c867211.tar.gz
go-da7496d84128be85a4db5b6fdf9029c48c867211.zip
os/signal: increase test timeouts on ppc64*/linux
TestSignalTrace can take a bit longer to run on some ppc64{,le} machines. I was only able to reproduce the timeout reliably on a POWER8/ppc64le ubuntu 16.04 host. Bump the timeout to 5 seconds. This should be more than sufficient for a test which occasionally takes a bit longer to run on these builders. Fixes #45773 Change-Id: I4177bb986561f714aabfa5b0ca44b1c90b1cd94f Reviewed-on: https://go-review.googlesource.com/c/go/+/315049 Run-TryBot: Paul Murphy <murp@ibm.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
Diffstat (limited to 'src/os')
-rw-r--r--src/os/signal/signal_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/os/signal/signal_test.go b/src/os/signal/signal_test.go
index 4c19281e91..cea68742d2 100644
--- a/src/os/signal/signal_test.go
+++ b/src/os/signal/signal_test.go
@@ -18,6 +18,7 @@ import (
"runtime"
"runtime/trace"
"strconv"
+ "strings"
"sync"
"syscall"
"testing"
@@ -47,6 +48,13 @@ func init() {
//
// See https://golang.org/issue/33174.
settleTime = 11 * time.Second
+ } else if runtime.GOOS == "linux" && strings.HasPrefix(runtime.GOARCH, "ppc64") {
+ // Older linux kernels seem to have some hiccups delivering the signal
+ // in a timely manner on ppc64 and ppc64le. When running on a
+ // ppc64le/ubuntu 16.04/linux 4.4 host the time can vary quite
+ // substantially even on a idle system. 5 seconds is twice any value
+ // observed when running 10000 tests on such a system.
+ settleTime = 5 * time.Second
} else if s := os.Getenv("GO_TEST_TIMEOUT_SCALE"); s != "" {
if scale, err := strconv.Atoi(s); err == nil {
settleTime *= time.Duration(scale)