mirror of
https://github.com/opencontainers/runc.git
synced 2025-12-24 11:50:58 +08:00
tests/int/helpers: rm old code
This was added by commitca4f427af, 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 commit79fe41d3c1, this kludge is no longer needed. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user