mirror of https://github.com/docker/docs.git
Merge pull request #16908 from brahmaroutu/skip_oom_gccgo
Skipping two tests when running with GCCGO (CI)
This commit is contained in:
commit
bf8ba3d0c9
|
@ -58,6 +58,7 @@ func (s *DockerSuite) TestEventsOOMDisableFalse(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
testRequires(c, NativeExecDriver)
|
testRequires(c, NativeExecDriver)
|
||||||
testRequires(c, oomControl)
|
testRequires(c, oomControl)
|
||||||
|
testRequires(c, NotGCCGO)
|
||||||
|
|
||||||
errChan := make(chan error)
|
errChan := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -106,6 +107,7 @@ func (s *DockerSuite) TestEventsOOMDisableTrue(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
testRequires(c, NativeExecDriver)
|
testRequires(c, NativeExecDriver)
|
||||||
testRequires(c, oomControl)
|
testRequires(c, oomControl)
|
||||||
|
testRequires(c, NotGCCGO)
|
||||||
|
|
||||||
errChan := make(chan error)
|
errChan := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
|
|
|
@ -3138,7 +3138,7 @@ func (s *DockerSuite) TestAppArmorDeniesPtrace(c *check.C) {
|
||||||
|
|
||||||
// Run through 'sh' so we are NOT pid 1. Pid 1 may be able to trace
|
// Run through 'sh' so we are NOT pid 1. Pid 1 may be able to trace
|
||||||
// itself, but pid>1 should not be able to trace pid1.
|
// itself, but pid>1 should not be able to trace pid1.
|
||||||
_, exitCode, _ := dockerCmdWithError("run", "busybox", "sh", "-c", "readlink /proc/1/ns/net")
|
_, exitCode, _ := dockerCmdWithError("run", "busybox", "sh", "-c", "sh -c readlink /proc/1/ns/net")
|
||||||
if exitCode == 0 {
|
if exitCode == 0 {
|
||||||
c.Fatal("ptrace was not successfully restricted by AppArmor")
|
c.Fatal("ptrace was not successfully restricted by AppArmor")
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,10 +141,10 @@ var (
|
||||||
NotGCCGO = testRequirement{
|
NotGCCGO = testRequirement{
|
||||||
func() bool {
|
func() bool {
|
||||||
out, err := exec.Command("go", "version").Output()
|
out, err := exec.Command("go", "version").Output()
|
||||||
if err != nil && strings.Contains(string(out), "gccgo") {
|
if err == nil && strings.Contains(string(out), "gccgo") {
|
||||||
return true
|
return false
|
||||||
}
|
}
|
||||||
return false
|
return true
|
||||||
},
|
},
|
||||||
"Test requires native Golang compiler instead of GCCGO",
|
"Test requires native Golang compiler instead of GCCGO",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue