diff options
author | Jess Frazelle <me@jessfraz.com> | 2017-04-13 21:22:22 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-04-13 22:47:55 +0000 |
commit | 75176947d6791e8f2c128e8ae8847f05507b6336 (patch) | |
tree | 4830781e0ffa2a71b4bdb0899a3cfeae6b3c1d9d /src/syscall/exec_linux_test.go | |
parent | f75b5e99ed19e97ea78e62a406d03c1632efa7d4 (diff) | |
download | go-75176947d6791e8f2c128e8ae8847f05507b6336.tar.gz go-75176947d6791e8f2c128e8ae8847f05507b6336.zip |
syscall: fix TestGroupCleanup{UserNamespace} on Alpine
This updates TestGroupCleanup and TestGroupCleanupUserNamespace to pass in the
Alpine builder.
Updates #19938
Change-Id: Iacbfd73782eccd57f872f9e85726c6024529c277
Reviewed-on: https://go-review.googlesource.com/40692
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Daniel Martà <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall/exec_linux_test.go')
-rw-r--r-- | src/syscall/exec_linux_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go index 9551e7ec71..83cde96b1f 100644 --- a/src/syscall/exec_linux_test.go +++ b/src/syscall/exec_linux_test.go @@ -207,9 +207,10 @@ func TestGroupCleanup(t *testing.T) { t.Fatalf("Cmd failed with err %v, output: %s", err, out) } strOut := strings.TrimSpace(string(out)) - expected := "uid=0(root) gid=0(root) groups=0(root)" + expected := "uid=0(root) gid=0(root)" // Just check prefix because some distros reportedly output a // context parameter; see https://golang.org/issue/16224. + // Alpine does not output groups; see https://golang.org/issue/19938. if !strings.HasPrefix(strOut, expected) { t.Errorf("id command output: %q, expected prefix: %q", strOut, expected) } @@ -247,6 +248,7 @@ func TestGroupCleanupUserNamespace(t *testing.T) { "uid=0(root) gid=0(root) groups=0(root),65534(nobody)", "uid=0(root) gid=0(root) groups=0(root),65534(nogroup)", "uid=0(root) gid=0(root) groups=0(root),65534", + "uid=0(root) gid=0(root) groups=0(root),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody),65534(nobody)", // Alpine; see https://golang.org/issue/19938 } for _, e := range expected { if strOut == e { |