summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-03-17 21:29:49 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-03-17 21:35:11 +0100
commit8da5fd820955884fc61159e09b776cfec37f417a (patch)
tree5cafd5ebfef9ce71e379a448f3958bf2cd94fe43 /test/e2e/run_test.go
parent592aae4f924cfe1f3a3364d5e01a13bd005f8e82 (diff)
downloadpodman-8da5fd820955884fc61159e09b776cfec37f417a.tar.gz
podman-8da5fd820955884fc61159e09b776cfec37f417a.tar.bz2
podman-8da5fd820955884fc61159e09b776cfec37f417a.zip
test: check for io.stat existence on cgroup v2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 366ba666c..4e5106731 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -576,14 +576,12 @@ USER bin`
})
It("podman run blkio-weight test", func() {
- SkipIfRootless("FIXME: This is blowing up because of no /sys/fs/cgroup/user.slice/user-14467.slice/user@14467.service/cgroup.subtree_control file")
SkipIfRootlessCgroupsV1("Setting blkio-weight not supported on cgroupv1 for rootless users")
- if !CGROUPSV2 {
- if _, err := os.Stat("/sys/fs/cgroup/blkio/blkio.weight"); os.IsNotExist(err) {
- Skip("Kernel does not support blkio.weight")
- }
- }
+ SkipIfRootless("By default systemd doesn't delegate io to rootless users")
if CGROUPSV2 {
+ if _, err := os.Stat("/sys/fs/cgroup/io.stat"); os.IsNotExist(err) {
+ Skip("Kernel does not have io.stat")
+ }
session := podmanTest.Podman([]string{"run", "--rm", "--blkio-weight=15", ALPINE, "sh", "-c", "cat /sys/fs/cgroup/io.bfq.weight"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -592,6 +590,9 @@ USER bin`
// FIXME: drop "|51" once all the runtimes we test have the fix in place.
Expect(strings.Replace(session.OutputToString(), "default ", "", 1)).To(MatchRegexp("15|51"))
} else {
+ if _, err := os.Stat("/sys/fs/cgroup/blkio/blkio.weight"); os.IsNotExist(err) {
+ Skip("Kernel does not support blkio.weight")
+ }
session := podmanTest.Podman([]string{"run", "--rm", "--blkio-weight=15", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.weight"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))