summaryrefslogtreecommitdiff
path: root/src/syscall/syscall_unix_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/syscall_unix_test.go')
-rw-r--r--src/syscall/syscall_unix_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/syscall/syscall_unix_test.go b/src/syscall/syscall_unix_test.go
index 1c34ed2c27..7e6a8c9043 100644
--- a/src/syscall/syscall_unix_test.go
+++ b/src/syscall/syscall_unix_test.go
@@ -11,7 +11,6 @@ import (
"fmt"
"internal/testenv"
"io"
- "io/ioutil"
"net"
"os"
"os/exec"
@@ -79,7 +78,7 @@ func TestFcntlFlock(t *testing.T) {
}
if os.Getenv("GO_WANT_HELPER_PROCESS") == "" {
// parent
- tempDir, err := ioutil.TempDir("", "TestFcntlFlock")
+ tempDir, err := os.MkdirTemp("", "TestFcntlFlock")
if err != nil {
t.Fatalf("Failed to create temp dir: %v", err)
}
@@ -157,7 +156,7 @@ func TestPassFD(t *testing.T) {
}
- tempDir, err := ioutil.TempDir("", "TestPassFD")
+ tempDir, err := os.MkdirTemp("", "TestPassFD")
if err != nil {
t.Fatal(err)
}
@@ -257,7 +256,7 @@ func passFDChild() {
// We make it in tempDir, which our parent will clean up.
flag.Parse()
tempDir := flag.Arg(0)
- f, err := ioutil.TempFile(tempDir, "")
+ f, err := os.CreateTemp(tempDir, "")
if err != nil {
fmt.Printf("TempFile: %v", err)
return