mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Merge pull request #15861 from brahmaroutu/gccgo_x86
Enable building Docker with gcc-go on x86
This commit is contained in:
@@ -2853,7 +2853,7 @@ func (s *DockerSuite) TestPtraceContainerProcsFromHost(c *check.C) {
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestAppArmorDeniesPtrace(c *check.C) {
|
||||
testRequires(c, SameHostDaemon, NativeExecDriver, Apparmor, DaemonIsLinux)
|
||||
testRequires(c, SameHostDaemon, NativeExecDriver, Apparmor, DaemonIsLinux, NotGCCGO)
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -270,7 +270,8 @@ func (s *DockerSuite) TestRunOOMExitCode(c *check.C) {
|
||||
errChan := make(chan error)
|
||||
go func() {
|
||||
defer close(errChan)
|
||||
out, exitCode, _ := dockerCmdWithError("run", "-m", "4MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
|
||||
//changing memory to 40MB from 4MB due to an issue with GCCGO that test fails to start the container.
|
||||
out, exitCode, _ := dockerCmdWithError("run", "-m", "40MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
|
||||
if expected := 137; exitCode != expected {
|
||||
errChan <- fmt.Errorf("wrong exit code for OOM container: expected %d, got %d (output: %q)", expected, exitCode, out)
|
||||
}
|
||||
|
||||
@@ -137,6 +137,16 @@ var (
|
||||
},
|
||||
"Test requires support for IPv6",
|
||||
}
|
||||
NotGCCGO = testRequirement{
|
||||
func() bool {
|
||||
out, err := exec.Command("go", "version").Output()
|
||||
if err != nil && strings.Contains(string(out), "gccgo") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
"Test requires native Golang compiler instead of GCCGO",
|
||||
}
|
||||
)
|
||||
|
||||
// testRequires checks if the environment satisfies the requirements
|
||||
|
||||
Reference in New Issue
Block a user