aboutsummaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
Diffstat (limited to 'src/os')
-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)