]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: skip a couple tests when running under Kubernetes
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 1 Oct 2015 22:40:55 +0000 (15:40 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 2 Oct 2015 19:31:09 +0000 (19:31 +0000)
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>
src/syscall/exec_linux_test.go

index e4ed6adff946593a0c55b5f2511380d64b33fb27..cca3812a9e22b8feb5dab3d85d37c1faab8c3ddb 100644 (file)
@@ -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,