From fdb0590c402b541a7f3a988b77b8f4b69798dfd0 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 16 Sep 2020 09:18:45 -0700 Subject: [PATCH] tests/int/helpers: simplify set_cgroup_mount_writable Use update_config like in all the other places. Signed-off-by: Kir Kolyshkin --- tests/integration/helpers.bash | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index 62e2a464c..4287f5b63 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -214,10 +214,8 @@ function set_resources_limit() { # Helper function to make /sys/fs/cgroup writable function set_cgroup_mount_writable() { bundle="${1:-.}" - cat "$bundle/config.json" \ - | jq '.mounts |= map((select(.type == "cgroup") | .options -= ["ro"]) // .)' \ - >"$bundle/config.json.tmp" - mv "$bundle/config.json"{.tmp,} + update_config '.mounts |= map((select(.type == "cgroup") | .options -= ["ro"]) // .)' \ + $bundle } # Fails the current test, providing the error given.