diff options
author | Charlie Doern <cdoern@redhat.com> | 2022-07-21 20:54:00 -0400 |
---|---|---|
committer | Charlie Doern <cdoern@redhat.com> | 2022-07-22 11:42:51 -0400 |
commit | ad8940cecff20426120bc8eabff50e734ad7b765 (patch) | |
tree | 29097722fbd922f252683771a57bb56e13a86e1c /test/system | |
parent | 5e43fb15cc8165c855ab403dafb88daeb5dbdcd9 (diff) | |
download | podman-ad8940cecff20426120bc8eabff50e734ad7b765.tar.gz podman-ad8940cecff20426120bc8eabff50e734ad7b765.tar.bz2 podman-ad8940cecff20426120bc8eabff50e734ad7b765.zip |
fix container create/run throttle devices
pod resource limits introduced a regression where `FinishThrottleDevices` was not called for create/run
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/030-run.bats | 15 |
1 files changed, 15 insertions, 0 deletions
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 |