mirror of
https://github.com/golang/go
synced 2024-11-19 13:54:56 -07:00
runtime/trace: fix TestTraceSymbolize when GOMAXPROCS=1
CL 92916 added the GOMAXPROCS test in TestTraceSymbolize. This test only succeeds when the value of GOMAXPROCS changes. Since the test calls runtime.GOMAXPROCS(1), it will fails on machines where GOMAXPROCS=1. This change fixes the test by calling runtime.GOMAXPROCS(oldGoMaxProcs+1). Fixes #23816. Change-Id: I1183dbbd7db6077cbd7fa0754032ff32793b2195 Reviewed-on: https://go-review.googlesource.com/93735 Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
8693b4f095
commit
5114a7daa2
@ -128,7 +128,8 @@ func TestTraceSymbolize(t *testing.T) {
|
|||||||
wp.Write(data[:])
|
wp.Write(data[:])
|
||||||
<-pipeReadDone
|
<-pipeReadDone
|
||||||
|
|
||||||
oldGoMaxProcs := runtime.GOMAXPROCS(1)
|
oldGoMaxProcs := runtime.GOMAXPROCS(0)
|
||||||
|
runtime.GOMAXPROCS(oldGoMaxProcs + 1)
|
||||||
|
|
||||||
Stop()
|
Stop()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user