From 2eb7e31dc378a02fd83faa7d41239df0f2859677 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Fri, 28 Jul 2023 16:09:22 -0300 Subject: [PATCH] use t.TestDir instead of os.Mkdirtemp --- src/cmd/internal/obj/x86/asm_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cmd/internal/obj/x86/asm_test.go b/src/cmd/internal/obj/x86/asm_test.go index dace966bf6..458a91258a 100644 --- a/src/cmd/internal/obj/x86/asm_test.go +++ b/src/cmd/internal/obj/x86/asm_test.go @@ -298,11 +298,7 @@ func TestRegIndex(t *testing.T) { // code can be aligned to the alignment value. func TestPCALIGN(t *testing.T) { testenv.MustHaveGoBuild(t) - dir, err := os.MkdirTemp("", "testpcalign") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(dir) + dir := t.TempDir() tmpfile := filepath.Join(dir, "test.s") tmpout := filepath.Join(dir, "test.o")