From 69cdffdb9359ff97d91e4f4fbb6b2714c3898eae Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 25 Oct 2021 07:47:07 +0200 Subject: [PATCH] unix: use default directories in TestGetwd on darwin/arm64 Go 1.16 renamed the iOS port from darwin/arm64 to ios/arm64 and darwin/arm64 was repurposed for the macOS ARM64 port (see https://golang.org/doc/go1.16#darwin). Now that Go 1.16 is the oldest supported release, the ios tag can be used exclusively to detect iOS and TestGetwd can use the same list of directories as other systems. For golang/go#45696 Change-Id: Ic334df5ea88ac034a9d9271f6cd570617f208f05 Reviewed-on: https://go-review.googlesource.com/c/sys/+/358254 Trust: Tobias Klauser Run-TryBot: Tobias Klauser TryBot-Result: Go Bot Reviewed-by: Cherry Mui --- unix/syscall_unix_test.go | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/unix/syscall_unix_test.go b/unix/syscall_unix_test.go index 4d66d1d8..c1478ed2 100644 --- a/unix/syscall_unix_test.go +++ b/unix/syscall_unix_test.go @@ -610,19 +610,16 @@ func TestGetwd(t *testing.T) { switch runtime.GOOS { case "android": dirs = []string{"/", "/system/bin"} - case "darwin", "ios": - switch runtime.GOARCH { - case "arm64": - d1, err := ioutil.TempDir("", "d1") - if err != nil { - t.Fatalf("TempDir: %v", err) - } - d2, err := ioutil.TempDir("", "d2") - if err != nil { - t.Fatalf("TempDir: %v", err) - } - dirs = []string{d1, d2} + case "ios": + d1, err := ioutil.TempDir("", "d1") + if err != nil { + t.Fatalf("TempDir: %v", err) } + d2, err := ioutil.TempDir("", "d2") + if err != nil { + t.Fatalf("TempDir: %v", err) + } + dirs = []string{d1, d2} } oldwd := os.Getenv("PWD") for _, d := range dirs {