1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #37194 from AntaresS/fix-test-failure

fix a failed test
This commit is contained in:
Sebastiaan van Stijn 2018-06-05 02:38:04 +02:00 committed by GitHub
commit ca25df3b54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -619,7 +619,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")
// memory limit lower than 8MB will raise an error of "device or resource busy" from docker-runc.
out, exitCode, _ := dockerCmdWithError("run", "-m", "8MB", "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)
}