summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-07-23 01:35:58 +0200
committerGitHub <noreply@github.com>2022-07-23 01:35:58 +0200
commitda1f47921685f40f1b26405278cbf9cb2d06fe09 (patch)
tree598374f4839b1fd171b20704b929af16c199d9b1 /test
parent935c150ee214e689b8f25c195ecc22af12d1ddc7 (diff)
parentad8940cecff20426120bc8eabff50e734ad7b765 (diff)
downloadpodman-da1f47921685f40f1b26405278cbf9cb2d06fe09.tar.gz
podman-da1f47921685f40f1b26405278cbf9cb2d06fe09.tar.bz2
podman-da1f47921685f40f1b26405278cbf9cb2d06fe09.zip
Merge pull request #15035 from cdoern/cgroup
fix container create/run throttle devices
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go4
-rw-r--r--test/system/030-run.bats15
2 files changed, 15 insertions, 4 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 64b70f1ee..c6c8534ad 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -715,7 +715,6 @@ USER bin`, BB)
})
It("podman run device-read-bps test", func() {
- SkipIfCgroupV1("FIXME: #15035 - bps broken")
SkipIfRootless("FIXME: requested cgroup controller `io` is not available")
SkipIfRootlessCgroupsV1("Setting device-read-bps not supported on cgroupv1 for rootless users")
@@ -735,7 +734,6 @@ USER bin`, BB)
})
It("podman run device-write-bps test", func() {
- SkipIfCgroupV1("FIXME: #15035 - bps broken")
SkipIfRootless("FIXME: requested cgroup controller `io` is not available")
SkipIfRootlessCgroupsV1("Setting device-write-bps not supported on cgroupv1 for rootless users")
@@ -754,7 +752,6 @@ USER bin`, BB)
})
It("podman run device-read-iops test", func() {
- SkipIfCgroupV1("FIXME: #15035 - bps broken")
SkipIfRootless("FIXME: requested cgroup controller `io` is not available")
SkipIfRootlessCgroupsV1("Setting device-read-iops not supported on cgroupv1 for rootless users")
var session *PodmanSessionIntegration
@@ -773,7 +770,6 @@ USER bin`, BB)
})
It("podman run device-write-iops test", func() {
- SkipIfCgroupV1("FIXME: #15035 - bps broken")
SkipIfRootless("FIXME: requested cgroup controller `io` is not available")
SkipIfRootlessCgroupsV1("Setting device-write-iops not supported on cgroupv1 for rootless users")
var session *PodmanSessionIntegration
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index e62e7679f..5014ef47b 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -855,4 +855,19 @@ EOF
run_podman rm $output
}
+@test "podman run --device-read-bps" {
+ skip_if_rootless "cannot use this flag in rootless mode"
+ # this test is a triple check on blkio flags since they seem to sneak by the tests
+ if is_cgroupsv2; then
+ run_podman run -dt --device-read-bps=/dev/zero:1M $IMAGE top
+ run_podman exec -it $output cat /sys/fs/cgroup/io.max
+ is "$output" ".*1:5 rbps=1048576 wbps=max riops=max wiops=max" "throttle devices passed successfully.*"
+ else
+ run_podman run -dt --device-read-bps=/dev/zero:1M $IMAGE top
+ run_podman exec -it $output cat /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
+ is "$output" ".*1:5 1048576" "throttle devices passed successfully.*"
+ fi
+ run_podman container rm -fa
+}
+
# vim: filetype=sh