mirror of
https://github.com/containers/podman.git
synced 2025-12-03 19:59:39 +08:00
test: run --cgroups=split in new cgroup
the --cgroups=split test changes the current cgroup as it creates a sub-cgroup. This can cause a race condition in tests that are reading the current cgroup. Closes: https://github.com/containers/podman/issues/11191 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -1381,13 +1381,13 @@ USER mail`, BB)
|
||||
}
|
||||
}
|
||||
|
||||
container := podmanTest.Podman([]string{"run", "--rm", "--cgroups=split", ALPINE, "cat", "/proc/self/cgroup"})
|
||||
container := podmanTest.PodmanSystemdScope([]string{"run", "--rm", "--cgroups=split", ALPINE, "cat", "/proc/self/cgroup"})
|
||||
container.WaitWithDefaultTimeout()
|
||||
Expect(container).Should(Exit(0))
|
||||
checkLines(container.OutputToStringArray())
|
||||
|
||||
// check that --cgroups=split is honored also when a container runs in a pod
|
||||
container = podmanTest.Podman([]string{"run", "--rm", "--pod", "new:split-test-pod", "--cgroups=split", ALPINE, "cat", "/proc/self/cgroup"})
|
||||
container = podmanTest.PodmanSystemdScope([]string{"run", "--rm", "--pod", "new:split-test-pod", "--cgroups=split", ALPINE, "cat", "/proc/self/cgroup"})
|
||||
container.WaitWithDefaultTimeout()
|
||||
Expect(container).Should(Exit(0))
|
||||
checkLines(container.OutputToStringArray())
|
||||
|
||||
Reference in New Issue
Block a user