From 4d6788ecae127017ab4ab4d5d5907b8912a08bd6 Mon Sep 17 00:00:00 2001 From: Mohit Agarwal Date: Thu, 5 May 2016 00:04:54 +0530 Subject: [PATCH] runtime: clean up profiling data files produced by TestCgoPprof Fixes #15541 Change-Id: I9b6835157db0eb86de13591e785f971ffe754baa Reviewed-on: https://go-review.googlesource.com/22783 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/runtime/crash_cgo_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index f9d665650b..cb46c2a5dc 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -10,6 +10,7 @@ import ( "bytes" "fmt" "internal/testenv" + "os" "os/exec" "runtime" "strings" @@ -250,6 +251,7 @@ func TestCgoPprof(t *testing.T) { t.Fatal(err) } fn := strings.TrimSpace(string(got)) + defer os.Remove(fn) top, err := exec.Command("go", "tool", "pprof", "-top", "-nodecount=1", exe, fn).CombinedOutput() if err != nil { -- 2.50.0