aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2026-03-08 12:58:26 -0400
committerGopher Robot <gobot@golang.org>2026-03-10 13:11:44 -0700
commitc29bec8a3acc2a5464fc3aa04cb03dc2408a2030 (patch)
treeaa2aed45fc930009cf843b1875c019b1c51b7772
parent7337b4669b587159bc0d6c431c91057b938faa9a (diff)
downloadgo-c29bec8a3acc2a5464fc3aa04cb03dc2408a2030.tar.xz
os: allow EPERM during TestGetwdDeep
Change-Id: Iceadf12f4211eb58dd10dceeca7e68ec228aee61 Reviewed-on: https://go-review.googlesource.com/c/go/+/752900 Auto-Submit: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
-rw-r--r--src/os/getwd_unix_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/os/getwd_unix_test.go b/src/os/getwd_unix_test.go
index 3f3067b5d5..de33f15618 100644
--- a/src/os/getwd_unix_test.go
+++ b/src/os/getwd_unix_test.go
@@ -62,8 +62,9 @@ func testGetwdDeep(t *testing.T, setPWD bool) {
if err != nil {
// 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.EACCES) {
- t.Logf("ignoring EACCES error: %v", err)
+ // We can also get EPERM in some sandboxes for the same reason.
+ if errors.Is(err, syscall.EACCES) || errors.Is(err, syscall.EPERM) {
+ t.Logf("ignoring EACCES/EPERM error: %v", err)
break
}
t.Fatal(err)