diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-02-23 17:16:21 -0800 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2016-04-14 05:25:13 +0000 |
commit | 16b00c92e9baaa75ffd25c43c01e1adfc5ebc9d3 (patch) | |
tree | e2d1786bb999ffc08210b25e3cdc05068f9f7460 | |
parent | d389a19c487de550a84b424109d66a2f3c3af004 (diff) | |
download | go-16b00c92e9baaa75ffd25c43c01e1adfc5ebc9d3.tar.gz go-16b00c92e9baaa75ffd25c43c01e1adfc5ebc9d3.zip |
runtime: deflake TestCgoCheckBytes
Bump up the multiplier to 20. Also run the fast version first, so that
the slow version is likely to start up faster.
Change-Id: Ia0654cc1212ab03a45da1904d3e4b57d6a8d02a0
Reviewed-on: https://go-review.googlesource.com/19835
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/22070
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r-- | src/runtime/crash_cgo_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index d07a92ffb2..5e60cbe2c3 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -162,19 +162,19 @@ func TestCgoCheckBytes(t *testing.T) { } cmd := testEnv(exec.Command(exe, "CgoCheckBytes")) + cmd.Env = append(cmd.Env, "GODEBUG=cgocheck=0") start := time.Now() cmd.Run() d1 := time.Since(start) cmd = testEnv(exec.Command(exe, "CgoCheckBytes")) - cmd.Env = append(cmd.Env, "GODEBUG=cgocheck=0") start = time.Now() cmd.Run() d2 := time.Since(start) - if d2*10 < d1 { + if d1*20 < d2 { t.Errorf("cgo check too slow: got %v, expected at most %v", d1, d2*10) } } |