]> Cypherpunks repositories - gostls13.git/commitdiff
os: check for EACCES, not EPERM, in Getwd test
authorIan Lance Taylor <iant@golang.org>
Wed, 4 Sep 2024 18:47:47 +0000 (11:47 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 12 Sep 2024 00:11:48 +0000 (00:11 +0000)
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>
src/os/getwd_unix_test.go

index f5265445c26309ab97c5ee442af99b3884553f19..3f3067b5d59c3b42a54ffc50f891af7a0f735ef2 100644 (file)
@@ -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)