mirror of
https://github.com/moby/moby.git
synced 2025-12-04 19:23:06 +03:00
Add the swapMemorySupport requirement to OOM tests
Add the swapMemorySupport requirement to all tests related to the OOM killer. The --memory option has the subtle side effect of defaulting --memory-swap to double the value of --memory. The OOM killer doesn't kick in until the container exhausts memory+swap, and so without the memory swap cgroup the tests will timeout due to swap being effectively unlimited. Document the default behavior of --memory-swap in the docker run man page. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user