aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/export_debug_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-11-04 20:06:19 -0800
committerIan Lance Taylor <iant@golang.org>2019-11-08 18:00:54 +0000
commitcfb13126f3798bcb46b4f947aaa16929ab5c147f (patch)
treea2ac541f8823bc1d6063761e677cc5a304625b1c /src/runtime/export_debug_test.go
parenta2cd2bd55d1e932b52f0b7dea45a85e058fc77d5 (diff)
downloadgo-cfb13126f3798bcb46b4f947aaa16929ab5c147f.tar.xz
runtime: sleep a bit when waiting for running debug call goroutine
Without this CL, one of the TestDebugCall tests would fail 1% to 2% of the time on the android-amd64-emu gomote. With this CL, I ran the tests for 1000 iterations with no failures. Fixes #32985 Change-Id: I541268a2a0c10d0cd7604f0b2dbd15c1d18e5730 Reviewed-on: https://go-review.googlesource.com/c/go/+/205248 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/runtime/export_debug_test.go')
-rw-r--r--src/runtime/export_debug_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/export_debug_test.go b/src/runtime/export_debug_test.go
index e97dd52f20..7deddd52ea 100644
--- a/src/runtime/export_debug_test.go
+++ b/src/runtime/export_debug_test.go
@@ -67,6 +67,7 @@ func InjectDebugCall(gp *g, fn, args interface{}, tkill func(tid int) error) (in
case "retry _Grunnable", "executing on Go runtime stack":
// These are transient states. Try to get out of them.
if i < 100 {
+ usleep(100)
Gosched()
continue
}