зеркало из https://github.com/microsoft/docker.git
Modify test to include /dev/shm sharing
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
(cherry picked from commit 457aeaa2e1
)
This commit is contained in:
Родитель
ec6d91ce43
Коммит
3f631b0d94
|
@ -1986,7 +1986,7 @@ func (s *DockerSuite) TestRunModeIpcHost(c *check.C) {
|
|||
func (s *DockerSuite) TestRunModeIpcContainer(c *check.C) {
|
||||
testRequires(c, SameHostDaemon, DaemonIsLinux)
|
||||
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "sh", "-c", "echo -n test > /dev/shm/test && top")
|
||||
|
||||
id := strings.TrimSpace(out)
|
||||
state, err := inspectField(id, "State.Running")
|
||||
|
@ -2007,6 +2007,11 @@ func (s *DockerSuite) TestRunModeIpcContainer(c *check.C) {
|
|||
if parentContainerIpc != out {
|
||||
c.Fatalf("IPC different with --ipc=container:%s %s != %s\n", id, parentContainerIpc, out)
|
||||
}
|
||||
|
||||
catOutput, _ := dockerCmd(c, "run", fmt.Sprintf("--ipc=container:%s", id), "busybox", "cat", "/dev/shm/test")
|
||||
if catOutput != "test" {
|
||||
c.Fatalf("Output of /dev/shm/test expected test but found: %s", catOutput)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRunModeIpcContainerNotExists(c *check.C) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче