Commit 90dbd428 authored by David Crawshaw's avatar David Crawshaw

runtime/pprof: skip tests that fork on darwin/arm

Change-Id: I9b08b74214e5a41a7e98866a993b038030a4c073
Reviewed-on: https://go-review.googlesource.com/6251Reviewed-by: 's avatarHyang-Ah Hana Kim <hyangah@gmail.com>
parent da4874cb
...@@ -122,15 +122,16 @@ func parseProfile(t *testing.T, bytes []byte, f func(uintptr, []uintptr)) { ...@@ -122,15 +122,16 @@ func parseProfile(t *testing.T, bytes []byte, f func(uintptr, []uintptr)) {
func testCPUProfile(t *testing.T, need []string, f func()) { func testCPUProfile(t *testing.T, need []string, f func()) {
switch runtime.GOOS { switch runtime.GOOS {
case "darwin": case "darwin":
out, err := exec.Command("uname", "-a").CombinedOutput() if runtime.GOARCH != "arm" {
if err != nil { out, err := exec.Command("uname", "-a").CombinedOutput()
t.Fatal(err) if err != nil {
t.Fatal(err)
}
vers := string(out)
t.Logf("uname -a: %v", vers)
} }
vers := string(out)
t.Logf("uname -a: %v", vers)
case "plan9": case "plan9":
// unimplemented t.Skip("skipping on plan9")
return
} }
var prof bytes.Buffer var prof bytes.Buffer
...@@ -200,6 +201,12 @@ func testCPUProfile(t *testing.T, need []string, f func()) { ...@@ -200,6 +201,12 @@ func testCPUProfile(t *testing.T, need []string, f func()) {
} }
func TestCPUProfileWithFork(t *testing.T) { func TestCPUProfileWithFork(t *testing.T) {
if runtime.GOOS == "darwin" {
if runtime.GOARCH == "arm" {
t.Skipf("skipping on darwin/arm")
}
}
// Fork can hang if preempted with signals frequently enough (see issue 5517). // Fork can hang if preempted with signals frequently enough (see issue 5517).
// Ensure that we do not do this. // Ensure that we do not do this.
heap := 1 << 30 heap := 1 << 30
......
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