From 0ed1f8022d99b70309d60870360df9a070bbdfbb Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 6 May 2021 16:35:53 -0700 Subject: [PATCH] tests/int/helpers: rm old code This was added by commit ca4f427af, together with set_resources_limit, and was needed for the latter, since sed was used to update resources. Now when we switched to jq in commit 79fe41d3c16b, this kludge is no longer needed. Signed-off-by: Kir Kolyshkin --- tests/integration/helpers.bash | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index d265f667a..c5148f348 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -68,11 +68,6 @@ function runc_spec() { if [[ "$ROOTLESS" -ne 0 ]] && [[ "$ROOTLESS_FEATURES" == *"idmap"* ]]; then runc_rootless_idmap "$bundle" fi - - # Ensure config.json contains linux.resources - if [[ "$ROOTLESS" -ne 0 ]] && [[ "$ROOTLESS_FEATURES" == *"cgroup"* ]]; then - runc_rootless_cgroup "$bundle" - fi } # Helper function to reformat config.json file. Input uses jq syntax. @@ -92,12 +87,6 @@ function runc_rootless_idmap() { | .linux.gidMappings += [{"hostID": '"$(($ROOTLESS_GIDMAP_START + 100))"', "containerID": 1000, "size": '"$(($ROOTLESS_GIDMAP_LENGTH - 1000))"'}]' $bundle } -# Shortcut to add empty resources as part of a rootless configuration. -function runc_rootless_cgroup() { - bundle="${1:-.}" - update_config '.linux.resources += {"memory":{},"cpu":{},"blockio":{},"pids":{}}' $bundle -} - # Returns systemd version as a number (-1 if systemd is not enabled/supported). function systemd_version() { if [ -n "${RUNC_USE_SYSTEMD}" ]; then