From e9a500f47dadcd73c970649a1072d28997617610 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 4 Sep 2024 11:47:47 -0700 Subject: [PATCH] os: check for EACCES, not EPERM, in Getwd test Fixes #69406 Change-Id: I1c6b1498d87f94cc9196a933c13df1c3369e19a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/610756 LUCI-TryBot-Result: Go LUCI Run-TryBot: Ian Lance Taylor Auto-Submit: Tim King TryBot-Result: Gopher Robot Auto-Submit: Ian Lance Taylor Reviewed-by: Tim King Reviewed-by: Ian Lance Taylor --- src/os/getwd_unix_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/os/getwd_unix_test.go b/src/os/getwd_unix_test.go index f5265445c2..3f3067b5d5 100644 --- a/src/os/getwd_unix_test.go +++ b/src/os/getwd_unix_test.go @@ -60,10 +60,10 @@ func testGetwdDeep(t *testing.T, setPWD bool) { wd, err := Getwd() t.Logf("Getwd len: %d", len(wd)) if err != nil { - // We can get an EPERM error if we can't read up + // We can get an EACCES error if we can't read up // to root, which happens on the Android builders. - if errors.Is(err, syscall.EPERM) { - t.Logf("ignoring EPERM error: %v", err) + if errors.Is(err, syscall.EACCES) { + t.Logf("ignoring EACCES error: %v", err) break } t.Fatal(err) -- 2.48.1