summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2015-04-11 19:04:25 -0400
committerDavid Crawshaw <crawshaw@golang.org>2015-04-13 11:58:03 +0000
commit0a81d31b66566cc62f028825612b9c1c858870ef (patch)
tree8d7e02ce436363fc13bee508b42d37a6121457b8 /src
parent2ce82c6c65ce07f85523a05ec7cf94332e496452 (diff)
downloadgo-git-0a81d31b66566cc62f028825612b9c1c858870ef.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/pprof/pprof_test.go10
-rw-r--r--src/runtime/pprof/trace_test.go5
2 files changed, 12 insertions, 3 deletions
diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go
index 65d0a0aa8e..0189f457a7 100644
--- a/src/runtime/pprof/pprof_test.go
+++ b/src/runtime/pprof/pprof_test.go
@@ -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)
}
}
diff --git a/src/runtime/pprof/trace_test.go b/src/runtime/pprof/trace_test.go
index 2b85e47993..ca22a0dd27 100644
--- a/src/runtime/pprof/trace_test.go
+++ b/src/runtime/pprof/trace_test.go
@@ -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 {