From: David Crawshaw Date: Fri, 20 Nov 2015 17:03:07 +0000 (-0500) Subject: runtime/pprof: check if test can fork X-Git-Tag: go1.6beta1~353 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2fa64c41828f746d917cf7b7b6c3a39f33bd1161;p=gostls13.git runtime/pprof: check if test can fork (TestStackBarrierProfiling is failing on darwin/arm.) Change-Id: I8006d6222ccafc213821e02105896440079caa37 Reviewed-on: https://go-review.googlesource.com/17091 Reviewed-by: Austin Clements Run-TryBot: David Crawshaw TryBot-Result: Gobot Gobot --- diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index 2d8a187f83..ce10c219f6 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.go @@ -332,6 +332,7 @@ func TestStackBarrierProfiling(t *testing.T) { if !strings.Contains(os.Getenv("GODEBUG"), "gcstackbarrierall=1") { // Re-execute this test with constant GC and stack // barriers at every frame. + testenv.MustHaveExec(t) cmd := exec.Command(os.Args[0], "-test.run=TestStackBarrierProfiling") cmd.Env = append([]string{"GODEBUG=gcstackbarrierall=1", "GOGC=1"}, os.Environ()...) if out, err := cmd.CombinedOutput(); err != nil {