aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata/testprog
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/testdata/testprog')
-rw-r--r--src/runtime/testdata/testprog/memprof.go3
-rw-r--r--src/runtime/testdata/testprog/syscalls_linux.go3
-rw-r--r--src/runtime/testdata/testprog/timeprof.go3
-rw-r--r--src/runtime/testdata/testprog/vdso.go3
4 files changed, 4 insertions, 8 deletions
diff --git a/src/runtime/testdata/testprog/memprof.go b/src/runtime/testdata/testprog/memprof.go
index 7b134bc078..0392e60f84 100644
--- a/src/runtime/testdata/testprog/memprof.go
+++ b/src/runtime/testdata/testprog/memprof.go
@@ -7,7 +7,6 @@ package main
import (
"bytes"
"fmt"
- "io/ioutil"
"os"
"runtime"
"runtime/pprof"
@@ -31,7 +30,7 @@ func MemProf() {
runtime.GC()
- f, err := ioutil.TempFile("", "memprof")
+ f, err := os.CreateTemp("", "memprof")
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
diff --git a/src/runtime/testdata/testprog/syscalls_linux.go b/src/runtime/testdata/testprog/syscalls_linux.go
index b8ac087626..48f8014237 100644
--- a/src/runtime/testdata/testprog/syscalls_linux.go
+++ b/src/runtime/testdata/testprog/syscalls_linux.go
@@ -7,7 +7,6 @@ package main
import (
"bytes"
"fmt"
- "io/ioutil"
"os"
"syscall"
)
@@ -17,7 +16,7 @@ func gettid() int {
}
func tidExists(tid int) (exists, supported bool) {
- stat, err := ioutil.ReadFile(fmt.Sprintf("/proc/self/task/%d/stat", tid))
+ stat, err := os.ReadFile(fmt.Sprintf("/proc/self/task/%d/stat", tid))
if os.IsNotExist(err) {
return false, true
}
diff --git a/src/runtime/testdata/testprog/timeprof.go b/src/runtime/testdata/testprog/timeprof.go
index 0702885369..1e90af4033 100644
--- a/src/runtime/testdata/testprog/timeprof.go
+++ b/src/runtime/testdata/testprog/timeprof.go
@@ -6,7 +6,6 @@ package main
import (
"fmt"
- "io/ioutil"
"os"
"runtime/pprof"
"time"
@@ -17,7 +16,7 @@ func init() {
}
func TimeProf() {
- f, err := ioutil.TempFile("", "timeprof")
+ f, err := os.CreateTemp("", "timeprof")
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
diff --git a/src/runtime/testdata/testprog/vdso.go b/src/runtime/testdata/testprog/vdso.go
index ef92f48758..d2a300d8f2 100644
--- a/src/runtime/testdata/testprog/vdso.go
+++ b/src/runtime/testdata/testprog/vdso.go
@@ -8,7 +8,6 @@ package main
import (
"fmt"
- "io/ioutil"
"os"
"runtime/pprof"
"time"
@@ -19,7 +18,7 @@ func init() {
}
func signalInVDSO() {
- f, err := ioutil.TempFile("", "timeprofnow")
+ f, err := os.CreateTemp("", "timeprofnow")
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)