diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2015-10-01 15:40:55 -0700 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-10-02 19:31:09 +0000 |
commit | f35310edff6a16fd247fab47cc4e37874a668c5d (patch) | |
tree | 092251f16ce4187d650a92b98144723265cf9a2e /src/syscall/exec_linux_test.go | |
parent | 4c2a4004bd385a624988bee7b4d750975b99f40c (diff) | |
download | go-f35310edff6a16fd247fab47cc4e37874a668c5d.tar.gz go-f35310edff6a16fd247fab47cc4e37874a668c5d.zip |
syscall: skip a couple tests when running under Kubernetes
Update #12815
Change-Id: I3bf6de74bc8ab07000fe9a4308299839ef20632f
Reviewed-on: https://go-review.googlesource.com/15283
Reviewed-by: Evan Brown <evanbrown@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/syscall/exec_linux_test.go')
-rw-r--r-- | src/syscall/exec_linux_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go index e4ed6adff9..cca3812a9e 100644 --- a/src/syscall/exec_linux_test.go +++ b/src/syscall/exec_linux_test.go @@ -29,6 +29,13 @@ func whoamiCmd(t *testing.T, uid, gid int, setgroups bool) *exec.Cmd { t.Skip("kernel prohibits user namespace in unprivileged process") } } + // When running under the Go continuous build, skip tests for + // now when under Kubernetes. (where things are root but not quite) + // Both of these are our own environment variables. + // See Issue 12815. + if os.Getenv("GO_BUILDER_NAME") != "" && os.Getenv("IN_KUBERNETES") == "1" { + t.Skip("skipping test on Kubernetes-based builders; see Issue 12815") + } cmd := exec.Command("whoami") cmd.SysProcAttr = &syscall.SysProcAttr{ Cloneflags: syscall.CLONE_NEWUSER, |