tests/int/update: add cpu-quota -1 tests

Check that resetting cpu quota works.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-06-08 10:09:18 -07:00
parent 7c2b23497e
commit 1832bf0b88
1 changed files with 10 additions and 0 deletions

View File

@ -288,6 +288,11 @@ function check_cpu_shares() {
[ "$status" -eq 0 ]
check_cpu_quota 600000 900000 "670ms"
# remove cpu quota
runc update test_update --cpu-quota -1
[ "$status" -eq 0 ]
check_cpu_quota -1 900000 "infinity"
# update cpu-shares
runc update test_update --cpu-share 200
[ "$status" -eq 0 ]
@ -313,6 +318,11 @@ EOF
check_cpu_quota 600000 900000 "670ms"
check_cpu_shares 200
# remove cpu quota and reset the period
runc update test_update --cpu-quota -1 --cpu-period 100000
[ "$status" -eq 0 ]
check_cpu_quota -1 100000 "infinity"
# reset to initial test value via json file
cat << EOF > $BATS_TMPDIR/runc-cgroups-integration-test.json
{