From 65fa9ce8b51f86bf3c9c9ff4d7ae41b40a537e69 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Tue, 28 Feb 2023 21:12:13 +0000 Subject: [PATCH] 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 --- src/runtime/testdata/testprog/lockosthread.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } -- 2.50.0