From 390a98f3fdf726083d9a2b5e6ba1d9fee3af4ba6 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 3 Nov 2020 16:13:03 -0800 Subject: [PATCH] runc update: support unified resources Signed-off-by: Kir Kolyshkin --- tests/integration/update.bats | 25 +++++++++++++++++++++++++ update.go | 1 + 2 files changed, 26 insertions(+) diff --git a/tests/integration/update.bats b/tests/integration/update.bats index cb803bc9d..eda2b7ad2 100644 --- a/tests/integration/update.bats +++ b/tests/integration/update.bats @@ -363,6 +363,31 @@ EOF check_cpu_quota 30000 100000 "300ms" } +@test "update cgroup v2 resources via unified map" { + [[ "$ROOTLESS" -ne 0 ]] && requires rootless_cgroup + requires cgroups_v2 + + runc run -d --console-socket "$CONSOLE_SOCKET" test_update + [ "$status" -eq 0 ] + + # check that initial values were properly set + check_cpu_quota 500000 1000000 "500ms" + check_systemd_value "TasksMax" 20 + + runc update -r - test_update <