Change-Id: I62f1c51be89e9c2f22cc7b0b2e554ffa3da907ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/611038
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
func TestAddr2Line(t *testing.T) {
testenv.MustHaveGoBuild(t)
- tmpDir, err := os.MkdirTemp("", "TestAddr2Line")
- if err != nil {
- t.Fatal("TempDir failed: ", err)
- }
- defer os.RemoveAll(tmpDir)
+ tmpDir := t.TempDir()
// Build copy of test binary with debug symbols,
// since the one running now may not have them.