Commit 2fa64c41 authored by David Crawshaw's avatar David Crawshaw

runtime/pprof: check if test can fork

(TestStackBarrierProfiling is failing on darwin/arm.)

Change-Id: I8006d6222ccafc213821e02105896440079caa37
Reviewed-on: https://go-review.googlesource.com/17091Reviewed-by: 's avatarAustin Clements <austin@google.com>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 9fa6a2d4
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment