Skip to content

Commit 06a9034

Browse files
heschigopherbot
authored andcommitted
[release-branch.go1.21] net: tolerate permission errors in interface tests
On our linux-arm64 builders, we're getting permission errors despite running as root. Detect those errors and skip the test. Fixes #61414. Change-Id: I5d7c45789337bee3860b19335bbb9eb884c48986 Reviewed-on: https://go-review.googlesource.com/c/go/+/510737 Auto-Submit: Heschi Kreinick <[email protected]> Run-TryBot: Heschi Kreinick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> (cherry picked from commit 8e1ec1c) Reviewed-on: https://go-review.googlesource.com/c/go/+/511136 Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Bypass: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 03c7e96 commit 06a9034

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/net/interface_unix_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ func TestInterfaceArrivalAndDepartureZoneCache(t *testing.T) {
193193
t.Skipf("test requires external command: %v", err)
194194
}
195195
if err := ti.setup(); err != nil {
196+
if e := err.Error(); strings.Contains(e, "Permission denied") {
197+
t.Skipf("permission denied, skipping test: %v", e)
198+
}
196199
t.Fatal(err)
197200
}
198201
defer ti.teardown()

0 commit comments

Comments
 (0)