Merge pull request #22636 from sean-jc/fix-oom-killer-tests

Add the swapMemorySupport requirement to OOM tests
Upstream-commit: 95872b65fb65bcc275b2fa141b6a991ee085a41a
Component: engine
This commit is contained in:
Alexander Morozov
2016-05-12 14:41:55 -07:00
3 changed files with 5 additions and 4 deletions
@@ -8,7 +8,7 @@ import (
)
func (s *DockerSuite) TestInspectOomKilledTrue(c *check.C) {
testRequires(c, DaemonIsLinux, memoryLimitSupport)
testRequires(c, DaemonIsLinux, memoryLimitSupport, swapMemorySupport)
name := "testoomkilled"
_, exitCode, _ := dockerCmdWithError("run", "--name", name, "--memory", "32MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
@@ -20,7 +20,7 @@ func (s *DockerSuite) TestInspectOomKilledTrue(c *check.C) {
}
func (s *DockerSuite) TestInspectOomKilledFalse(c *check.C) {
testRequires(c, DaemonIsLinux, memoryLimitSupport)
testRequires(c, DaemonIsLinux, memoryLimitSupport, swapMemorySupport)
name := "testoomkilled"
dockerCmd(c, "run", "--name", name, "--memory", "32MB", "busybox", "sh", "-c", "echo hello world")
@@ -554,7 +554,7 @@ func (s *DockerSuite) TestRunWithInvalidPathforBlkioDeviceWriteIOps(c *check.C)
}
func (s *DockerSuite) TestRunOOMExitCode(c *check.C) {
testRequires(c, oomControl)
testRequires(c, memoryLimitSupport, swapMemorySupport)
errChan := make(chan error)
go func() {
defer close(errChan)