]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: skip tests that fork on darwin/arm
authorDavid Crawshaw <crawshaw@golang.org>
Fri, 27 Feb 2015 13:58:54 +0000 (08:58 -0500)
committerDavid Crawshaw <crawshaw@golang.org>
Fri, 27 Feb 2015 19:55:54 +0000 (19:55 +0000)
Change-Id: I9b08b74214e5a41a7e98866a993b038030a4c073
Reviewed-on: https://go-review.googlesource.com/6251
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
src/runtime/pprof/pprof_test.go

index 2d1bfa9a48c3f63acc5fa3b6c3d4e4e8c4581e7c..eeb6d109dd44c64dca5db2e94ae281e853a467db 100644 (file)
@@ -122,15 +122,16 @@ 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":
-               out, err := exec.Command("uname", "-a").CombinedOutput()
-               if err != nil {
-                       t.Fatal(err)
+               if runtime.GOARCH != "arm" {
+                       out, err := exec.Command("uname", "-a").CombinedOutput()
+                       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":
-               // unimplemented
-               return
+               t.Skip("skipping on plan9")
        }
 
        var prof bytes.Buffer
@@ -200,6 +201,12 @@ func testCPUProfile(t *testing.T, need []string, f func()) {
 }
 
 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).
        // Ensure that we do not do this.
        heap := 1 << 30