]> Cypherpunks repositories - gostls13.git/commitdiff
os: use t.TempDir in TestRemoveAllRace
authorKir Kolyshkin <kolyshkin@gmail.com>
Thu, 5 Sep 2024 00:31:31 +0000 (17:31 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 6 Sep 2024 13:22:35 +0000 (13:22 +0000)
Change-Id: I35d47bcac37945237bfef9f06195bc55dc9aa920
Reviewed-on: https://go-review.googlesource.com/c/go/+/611036
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/os/os_test.go

index e2ceaa9dffdd7e44ff1a3dbde3c841268eecd2a2..9f6f5312888d03bdf934cb4cbf7ba1b1aa78ba69 100644 (file)
@@ -2603,10 +2603,7 @@ func TestRemoveAllRace(t *testing.T) {
 
        n := runtime.GOMAXPROCS(16)
        defer runtime.GOMAXPROCS(n)
-       root, err := MkdirTemp("", "issue")
-       if err != nil {
-               t.Fatal(err)
-       }
+       root := t.TempDir()
        mkdirTree(t, root, 1, 6)
        hold := make(chan struct{})
        var wg sync.WaitGroup