Merge pull request #24648 from mlaventure/fix-kill-test

Fix TestDaemonRestartWithKilledRunningContainer failures on RHEL systems
Upstream-commit: ffba13f43539ff58a0021c9353229507d50b66d5
Component: engine
This commit is contained in:
Arnaud Porterie
2016-07-19 18:24:34 +00:00
committed by GitHub
27 changed files with 1164 additions and 285 deletions
@@ -7,7 +7,7 @@ import (
"os/exec"
"path/filepath"
"strings"
"time"
"syscall"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check"
@@ -129,7 +129,11 @@ func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
c.Fatalf("Could not kill daemon: %v", err)
}
time.Sleep(5 * time.Second)
for {
if err := syscall.Kill(s.d.cmd.Process.Pid, 0); err == syscall.ESRCH {
break
}
}
cmd := exec.Command("pgrep", "-f", "plugin-no-remove")
if out, ec, err := runCommandWithOutput(cmd); ec != 1 {