Commit 121d0766 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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 <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 7914369e
...@@ -182,6 +182,12 @@ func TestUnshare(t *testing.T) { ...@@ -182,6 +182,12 @@ func TestUnshare(t *testing.T) {
} }
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
if err != nil { if err != nil {
if strings.Contains(err.Error(), "operation not permitted") {
// Issue 17206: despite all the checks above,
// this still reportedly fails for some users.
// (older kernels?). Just skip.
t.Skip("skipping due to permission error")
}
t.Fatalf("Cmd failed with err %v, output: %s", err, out) t.Fatalf("Cmd failed with err %v, output: %s", err, out)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment