aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/systemd_test.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-06-09 13:55:03 +0200
committerMatthew Heon <mheon@redhat.com>2021-06-11 11:05:09 -0400
commitb61701acb38d64a3d2622ebb86ad794435e94e54 (patch)
tree8981c2b799e93bb0428895009a33646e4fd28ca2 /test/e2e/systemd_test.go
parent41fcd4d8ed9225e18f0d0d7c35b1916d14ceaf00 (diff)
downloadpodman-b61701acb38d64a3d2622ebb86ad794435e94e54.tar.gz
podman-b61701acb38d64a3d2622ebb86ad794435e94e54.tar.bz2
podman-b61701acb38d64a3d2622ebb86ad794435e94e54.zip
container: ignore named hierarchies
when looking up the container cgroup, ignore named hierarchies since containers running systemd as payload will create a sub-cgroup and move themselves there. Closes: https://github.com/containers/podman/issues/10602 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e/systemd_test.go')
-rw-r--r--test/e2e/systemd_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go
index b132750b0..8dc14d5f7 100644
--- a/test/e2e/systemd_test.go
+++ b/test/e2e/systemd_test.go
@@ -6,6 +6,7 @@ import (
"strings"
"time"
+ "github.com/containers/podman/v3/pkg/rootless"
. "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -115,6 +116,12 @@ WantedBy=multi-user.target
conData := result.InspectContainerToJSON()
Expect(len(conData)).To(Equal(1))
Expect(conData[0].Config.SystemdMode).To(BeTrue())
+
+ if CGROUPSV2 || !rootless.IsRootless() {
+ stats := podmanTest.Podman([]string{"stats", "--no-stream", ctrName})
+ stats.WaitWithDefaultTimeout()
+ Expect(stats.ExitCode()).To(Equal(0))
+ }
})
It("podman create container with systemd entrypoint triggers systemd mode", func() {