diff options
Diffstat (limited to 'libgo/go/syscall/getdirentries_test.go')
-rw-r--r-- | libgo/go/syscall/getdirentries_test.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libgo/go/syscall/getdirentries_test.go b/libgo/go/syscall/getdirentries_test.go index 66bb8acba2e..814e656649b 100644 --- a/libgo/go/syscall/getdirentries_test.go +++ b/libgo/go/syscall/getdirentries_test.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin || freebsd || netbsd || openbsd // +build darwin freebsd netbsd openbsd package syscall_test @@ -28,11 +29,7 @@ func testGetdirentries(t *testing.T, count int) { if count > 100 && testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" { t.Skip("skipping in -short mode") } - d, err := os.MkdirTemp("", "getdirentries-test") - if err != nil { - t.Fatalf("Tempdir: %v", err) - } - defer os.RemoveAll(d) + d := t.TempDir() var names []string for i := 0; i < count; i++ { names = append(names, fmt.Sprintf("file%03d", i)) |