diff options
| author | Katie Hockman <katie@golang.org> | 2020-12-14 10:03:05 -0500 |
|---|---|---|
| committer | Katie Hockman <katie@golang.org> | 2020-12-14 10:06:13 -0500 |
| commit | 0345ede87ee12698988973884cfc0fd3d499dffd (patch) | |
| tree | 7123cff141ee5661208d2f5f437b8f5252ac7f6a /src/runtime/runtime-gdb_test.go | |
| parent | 4651d6b267818b0e0d128a5443289717c4bb8cbc (diff) | |
| parent | 0a02371b0576964e81c3b40d328db9a3ef3b031b (diff) | |
| download | go-0345ede87ee12698988973884cfc0fd3d499dffd.tar.xz | |
[dev.fuzz] all: merge master into dev.fuzz
Change-Id: I5d8c8329ccc9d747bd81ade6b1cb7cb8ae2e94b2
Diffstat (limited to 'src/runtime/runtime-gdb_test.go')
| -rw-r--r-- | src/runtime/runtime-gdb_test.go | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go index e52bd1c4c4..5df8c3c745 100644 --- a/src/runtime/runtime-gdb_test.go +++ b/src/runtime/runtime-gdb_test.go @@ -8,7 +8,6 @@ import ( "bytes" "fmt" "internal/testenv" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -170,7 +169,7 @@ func testGdbPython(t *testing.T, cgo bool) { checkGdbVersion(t) checkGdbPython(t) - dir, err := ioutil.TempDir("", "go-build") + dir, err := os.MkdirTemp("", "go-build") if err != nil { t.Fatalf("failed to create temp directory: %v", err) } @@ -195,7 +194,7 @@ func testGdbPython(t *testing.T, cgo bool) { } } - err = ioutil.WriteFile(filepath.Join(dir, "main.go"), src, 0644) + err = os.WriteFile(filepath.Join(dir, "main.go"), src, 0644) if err != nil { t.Fatalf("failed to create file: %v", err) } @@ -404,7 +403,7 @@ func TestGdbBacktrace(t *testing.T) { t.Parallel() checkGdbVersion(t) - dir, err := ioutil.TempDir("", "go-build") + dir, err := os.MkdirTemp("", "go-build") if err != nil { t.Fatalf("failed to create temp directory: %v", err) } @@ -412,7 +411,7 @@ func TestGdbBacktrace(t *testing.T) { // Build the source code. src := filepath.Join(dir, "main.go") - err = ioutil.WriteFile(src, []byte(backtraceSource), 0644) + err = os.WriteFile(src, []byte(backtraceSource), 0644) if err != nil { t.Fatalf("failed to create file: %v", err) } @@ -482,7 +481,7 @@ func TestGdbAutotmpTypes(t *testing.T) { t.Skip("TestGdbAutotmpTypes is too slow on aix/ppc64") } - dir, err := ioutil.TempDir("", "go-build") + dir, err := os.MkdirTemp("", "go-build") if err != nil { t.Fatalf("failed to create temp directory: %v", err) } @@ -490,7 +489,7 @@ func TestGdbAutotmpTypes(t *testing.T) { // Build the source code. src := filepath.Join(dir, "main.go") - err = ioutil.WriteFile(src, []byte(autotmpTypeSource), 0644) + err = os.WriteFile(src, []byte(autotmpTypeSource), 0644) if err != nil { t.Fatalf("failed to create file: %v", err) } @@ -551,7 +550,7 @@ func TestGdbConst(t *testing.T) { t.Parallel() checkGdbVersion(t) - dir, err := ioutil.TempDir("", "go-build") + dir, err := os.MkdirTemp("", "go-build") if err != nil { t.Fatalf("failed to create temp directory: %v", err) } @@ -559,7 +558,7 @@ func TestGdbConst(t *testing.T) { // Build the source code. src := filepath.Join(dir, "main.go") - err = ioutil.WriteFile(src, []byte(constsSource), 0644) + err = os.WriteFile(src, []byte(constsSource), 0644) if err != nil { t.Fatalf("failed to create file: %v", err) } @@ -618,7 +617,7 @@ func TestGdbPanic(t *testing.T) { t.Parallel() checkGdbVersion(t) - dir, err := ioutil.TempDir("", "go-build") + dir, err := os.MkdirTemp("", "go-build") if err != nil { t.Fatalf("failed to create temp directory: %v", err) } @@ -626,7 +625,7 @@ func TestGdbPanic(t *testing.T) { // Build the source code. src := filepath.Join(dir, "main.go") - err = ioutil.WriteFile(src, []byte(panicSource), 0644) + err = os.WriteFile(src, []byte(panicSource), 0644) if err != nil { t.Fatalf("failed to create file: %v", err) } @@ -696,7 +695,7 @@ func TestGdbInfCallstack(t *testing.T) { t.Parallel() checkGdbVersion(t) - dir, err := ioutil.TempDir("", "go-build") + dir, err := os.MkdirTemp("", "go-build") if err != nil { t.Fatalf("failed to create temp directory: %v", err) } @@ -704,7 +703,7 @@ func TestGdbInfCallstack(t *testing.T) { // Build the source code. src := filepath.Join(dir, "main.go") - err = ioutil.WriteFile(src, []byte(InfCallstackSource), 0644) + err = os.WriteFile(src, []byte(InfCallstackSource), 0644) if err != nil { t.Fatalf("failed to create file: %v", err) } |
