mirror of
https://github.com/golang/go
synced 2024-11-19 15:14:45 -07:00
runtime/pprof: use switch for GOOS check in testCPUProfile
Since CL 33071, testCPUProfile is only one user of the badOS map. Replace it by the corresponding switch, with the "plan9" case removed because it is already checked earlier in the same function. Change-Id: Id647b8ee1fd37516bb702b35b3c9296a4f56b61b Reviewed-on: https://go-review.googlesource.com/75110 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
15f07dbf59
commit
2dd110f9a7
@ -177,7 +177,8 @@ func testCPUProfile(t *testing.T, need []string, f func(dur time.Duration)) {
|
||||
}
|
||||
}
|
||||
|
||||
if badOS[runtime.GOOS] {
|
||||
switch runtime.GOOS {
|
||||
case "darwin", "dragonfly", "netbsd", "solaris":
|
||||
t.Skipf("ignoring failure on %s; see golang.org/issue/13841", runtime.GOOS)
|
||||
}
|
||||
// Ignore the failure if the tests are running in a QEMU-based emulator,
|
||||
@ -392,15 +393,6 @@ func TestMathBigDivide(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
// Operating systems that are expected to fail the tests. See issue 13841.
|
||||
var badOS = map[string]bool{
|
||||
"darwin": true,
|
||||
"netbsd": true,
|
||||
"plan9": true,
|
||||
"dragonfly": true,
|
||||
"solaris": true,
|
||||
}
|
||||
|
||||
func TestBlockProfile(t *testing.T) {
|
||||
type TestCase struct {
|
||||
name string
|
||||
|
Loading…
Reference in New Issue
Block a user