From: Bryan C. Mills Date: Tue, 28 Feb 2023 21:12:13 +0000 (+0000) Subject: runtime: use os.TempDir instead of hard-coding /tmp X-Git-Tag: go1.21rc1~1418 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=65fa9ce8b51f86bf3c9c9ff4d7ae41b40a537e69;p=gostls13.git 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 Run-TryBot: Bryan Mills Reviewed-by: Michael Pratt Auto-Submit: Bryan Mills --- 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) }