From 1832bf0b88d19294e08c963c5230d9a21103a279 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 8 Jun 2020 10:09:18 -0700 Subject: [PATCH] tests/int/update: add cpu-quota -1 tests Check that resetting cpu quota works. Signed-off-by: Kir Kolyshkin --- tests/integration/update.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration/update.bats b/tests/integration/update.bats index af74b130..9a42e65c 100644 --- a/tests/integration/update.bats +++ b/tests/integration/update.bats @@ -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 {