aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/pprof
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-06-05 11:01:53 -0400
committerRuss Cox <rsc@golang.org>2015-06-16 18:07:36 +0000
commit7bc3e5880675ce4aae245f46d193924cff5efdfb (patch)
treebc5991015f83aa4852edaf31b096fc968c3f6369 /src/runtime/pprof
parent047f07a285edbc60f64018973be7ce6b341fe22d (diff)
downloadgo-7bc3e5880675ce4aae245f46d193924cff5efdfb.tar.xz
all: extract "can I exec?" check from tests into internal/testenv
Change-Id: I7b54be9d8b50b39e01c6be21f310ae9a10404e9d Reviewed-on: https://go-review.googlesource.com/10753 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/pprof')
-rw-r--r--src/runtime/pprof/pprof_test.go8
-rw-r--r--src/runtime/pprof/trace_test.go2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go
index 0189f457a7..e9fd1466ee 100644
--- a/src/runtime/pprof/pprof_test.go
+++ b/src/runtime/pprof/pprof_test.go
@@ -9,6 +9,7 @@ package pprof_test
import (
"bytes"
"fmt"
+ "internal/testenv"
"math/big"
"os"
"os/exec"
@@ -209,12 +210,7 @@ func testCPUProfile(t *testing.T, need []string, f func()) {
// Fork can hang if preempted with signals frequently enough (see issue 5517).
// Ensure that we do not do this.
func TestCPUProfileWithFork(t *testing.T) {
- if runtime.GOOS == "darwin" {
- switch runtime.GOARCH {
- case "arm", "arm64":
- t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH)
- }
- }
+ testenv.MustHaveExec(t)
heap := 1 << 30
if runtime.GOOS == "android" {
diff --git a/src/runtime/pprof/trace_test.go b/src/runtime/pprof/trace_test.go
index a333a3f83a..ba6eb66948 100644
--- a/src/runtime/pprof/trace_test.go
+++ b/src/runtime/pprof/trace_test.go
@@ -24,6 +24,8 @@ func skipTraceTestsIfNeeded(t *testing.T) {
case "darwin":
switch runtime.GOARCH {
case "arm", "arm64":
+ // TODO(rsc): What does this have to do with the trace tests?
+ // There is no forking here.
t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH)
}
}