aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-02-28 21:12:13 +0000
committerBryan Mills <bcmills@google.com>2023-02-28 22:18:56 +0000
commit65fa9ce8b51f86bf3c9c9ff4d7ae41b40a537e69 (patch)
tree7bfabcc29312963192309322c5e64581beeaf8c1 /src
parentec26277aecfba112089b1bb54b522bf062059e22 (diff)
downloadgo-65fa9ce8b51f86bf3c9c9ff4d7ae41b40a537e69.tar.xz
runtime: use os.TempDir instead of hard-coding /tmp
On Android, /tmp does not exist. Change-Id: Ib1797d79d89704a7a9466ad94efd57d2848b3b57 Reviewed-on: https://go-review.googlesource.com/c/go/+/472255 TryBot-Bypass: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/testdata/testprog/lockosthread.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/testdata/testprog/lockosthread.go b/src/runtime/testdata/testprog/lockosthread.go
index e9d7fdbc44..90d98e4972 100644
--- a/src/runtime/testdata/testprog/lockosthread.go
+++ b/src/runtime/testdata/testprog/lockosthread.go
@@ -155,7 +155,7 @@ func LockOSThreadAvoidsStatePropagation() {
}
// Chdir to somewhere else on this thread.
// On systems other than Linux, this is a no-op.
- if err := chdir("/tmp"); err != nil {
+ if err := chdir(os.TempDir()); err != nil {
println("failed to chdir:", err.Error())
os.Exit(1)
}