Merge pull request #15861 from brahmaroutu/gccgo_x86

Enable building Docker with gcc-go on x86
This commit is contained in:
Jess Frazelle
2015-09-16 13:29:02 -07:00
5 changed files with 90 additions and 3 deletions
+1 -1
View File
@@ -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.
+2 -1
View File
@@ -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)
}
+10
View File
@@ -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