Commit 81a9cc31 authored by Alex Brainman's avatar Alex Brainman

misc/cgo/test: do not run wasteCPU during TestParallelSleep unless on arm

R=golang-dev, r, minux.ma, dave, bradfitz
CC=golang-dev
https://golang.org/cl/6532052
parent 5a93fea0
......@@ -56,8 +56,12 @@ func wasteCPU() chan struct{} {
}
func testParallelSleep(t *testing.T) {
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2))
defer close(wasteCPU())
if runtime.GOARCH == "arm" {
// on ARM, the 1.3s deadline is frequently missed,
// and burning cpu seems to help
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2))
defer close(wasteCPU())
}
sleepSec := 1
start := time.Now()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment