mirror of
https://github.com/golang/go
synced 2024-11-25 19:37:58 -07:00
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Tim King <taking@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
e6138185db
commit
e9a500f47d
@ -60,10 +60,10 @@ func testGetwdDeep(t *testing.T, setPWD bool) {
|
|||||||
wd, err := Getwd()
|
wd, err := Getwd()
|
||||||
t.Logf("Getwd len: %d", len(wd))
|
t.Logf("Getwd len: %d", len(wd))
|
||||||
if err != nil {
|
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.
|
// to root, which happens on the Android builders.
|
||||||
if errors.Is(err, syscall.EPERM) {
|
if errors.Is(err, syscall.EACCES) {
|
||||||
t.Logf("ignoring EPERM error: %v", err)
|
t.Logf("ignoring EACCES error: %v", err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user