]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: skip fork test on darwin/arm64
authorDavid Crawshaw <crawshaw@golang.org>
Sat, 11 Apr 2015 23:04:25 +0000 (19:04 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 13 Apr 2015 11:58:03 +0000 (11:58 +0000)
Just like darwin/arm.

Change-Id: Ic75927bd6457d37cda7dd8279fd9b4cd52edc1d1
Reviewed-on: https://go-review.googlesource.com/8813
Reviewed-by: Minux Ma <minux@golang.org>
src/runtime/pprof/pprof_test.go
src/runtime/pprof/trace_test.go

index 65d0a0aa8ef87dbd8561d8f2b53ec131120043ef..0189f457a7bccb83f41e7c53dd5961c49db04d95 100644 (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)
                }
        }
 
index 2b85e47993985231d29a8ac63f6ea7459807f506..ca22a0dd27eb754208ebdf2876066ad881b35c93 100644 (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 {