1
0
mirror of https://github.com/golang/go synced 2024-11-19 21:04:43 -07:00

runtime/pprof: skip fork test on darwin/arm64

Just like darwin/arm.

Change-Id: Ic75927bd6457d37cda7dd8279fd9b4cd52edc1d1
Reviewed-on: https://go-review.googlesource.com/8813
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
David Crawshaw 2015-04-11 19:04:25 -04:00
parent 2ce82c6c65
commit 0a81d31b66
2 changed files with 12 additions and 3 deletions

View File

@ -122,7 +122,10 @@ func parseProfile(t *testing.T, bytes []byte, f func(uintptr, []uintptr)) {
func testCPUProfile(t *testing.T, need []string, f func()) {
switch runtime.GOOS {
case "darwin":
if runtime.GOARCH != "arm" {
switch runtime.GOARCH {
case "arm", "arm64":
// nothing
default:
out, err := exec.Command("uname", "-a").CombinedOutput()
if err != nil {
t.Fatal(err)
@ -207,8 +210,9 @@ func testCPUProfile(t *testing.T, need []string, f func()) {
// Ensure that we do not do this.
func TestCPUProfileWithFork(t *testing.T) {
if runtime.GOOS == "darwin" {
if runtime.GOARCH == "arm" {
t.Skipf("skipping on darwin/arm")
switch runtime.GOARCH {
case "arm", "arm64":
t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH)
}
}

View File

@ -21,6 +21,11 @@ func skipTraceTestsIfNeeded(t *testing.T) {
switch runtime.GOOS {
case "solaris":
t.Skip("skipping: solaris timer can go backwards (http://golang.org/issue/8976)")
case "darwin":
switch runtime.GOARCH {
case "arm", "arm64":
t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH)
}
}
switch runtime.GOARCH {