syscall: skip test on TestUnshareMountNameSpace permission error

TestUnshareMountNameSpace fails on arm64 due to permission problems.

Skip that test for now when permission problems are encountered, so we
don't regress elsewhere in the meantime.

Updates #19698

Change-Id: I9058928afa474b813652c9489f343b8957160a6c
Reviewed-on: https://go-review.googlesource.com/39052
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
Brad Fitzpatrick 2017-03-30 18:00:10 -07:00
parent 9ffbdabdb0
commit 3e4afe2307

View file

@ -297,7 +297,10 @@ func TestUnshareMountNameSpace(t *testing.T) {
o, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("unshare failed: %v, %v", o, err)
if strings.Contains(err.Error(), ": permission denied") {
t.Skipf("Skipping test (golang.org/issue/19698); unshare failed due to permissions: %s, %v", o, err)
}
t.Fatalf("unshare failed: %s, %v", o, err)
}
// How do we tell if the namespace was really unshared? It turns out