Skip to content

Commit 121d076

Browse files
committed
syscall: skip TestUnshare on Linux upon permission error
Fixes #17206 Change-Id: Id0ebc3a55ea1c5f52608decffee04c8398a8774b Reviewed-on: https://go-review.googlesource.com/48571 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 7914369 commit 121d076

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/syscall/exec_linux_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ func TestUnshare(t *testing.T) {
182182
}
183183
out, err := cmd.CombinedOutput()
184184
if err != nil {
185+
if strings.Contains(err.Error(), "operation not permitted") {
186+
// Issue 17206: despite all the checks above,
187+
// this still reportedly fails for some users.
188+
// (older kernels?). Just skip.
189+
t.Skip("skipping due to permission error")
190+
}
185191
t.Fatalf("Cmd failed with err %v, output: %s", err, out)
186192
}
187193

0 commit comments

Comments
 (0)