Commit 2dd110f9 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

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: default avatarIan Lance Taylor <iant@golang.org>
parent 15f07dbf
......@@ -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
......
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