From: Dmitriy Vyukov Date: Sun, 1 Jul 2012 17:59:50 +0000 (+0400) Subject: test: enforce 1 proc in the test X-Git-Tag: go1.1rc2~2848 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=91e56e6486a24a9e8cced7197df7cef6cba6da1a;p=gostls13.git test: enforce 1 proc in the test otherwise it fails spuriously with "newfunc allocated unexpectedly" message when run with GOMAXPROCS>1 (other goroutine allocates). R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6347056 --- diff --git a/test/closure.go b/test/closure.go index ae38900baa..c4a312464b 100644 --- a/test/closure.go +++ b/test/closure.go @@ -81,6 +81,7 @@ func h() { func newfunc() func(int) int { return func(x int) int { return x } } func main() { + runtime.GOMAXPROCS(1) var fail bool go f()