tests/int: rename a variable

Rename CGROUP_PATH to CGROUP_V2_PATH so it is more clear that it can
only be used for CGROUP_V2, and to resolve ambiguity with CGROUP_PATH
variable used in tests/rootless.sh.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2022-08-09 14:10:22 -07:00
parent e83ca51913
commit 41e04aa683
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -386,7 +386,7 @@ function setup() {
FREEZER="${FREEZER_DIR}/freezer.state"
STATE="FROZEN"
else
FREEZER_DIR="${CGROUP_PATH}"
FREEZER_DIR="${CGROUP_V2_PATH}"
FREEZER="${FREEZER_DIR}/cgroup.freeze"
STATE="1"
fi
+2 -2
View File
@@ -157,7 +157,7 @@ EOF
[[ "$output" =~ [0-9]+ ]]
# check create subcgroups success
[ -d "$CGROUP_PATH"/foo ]
[ -d "$CGROUP_V2_PATH"/foo ]
# force delete test_busybox
runc delete --force test_busybox
@@ -166,5 +166,5 @@ EOF
[ "$status" -ne 0 ]
# check delete subcgroups success
[ ! -d "$CGROUP_PATH"/foo ]
[ ! -d "$CGROUP_V2_PATH"/foo ]
}
+2 -2
View File
@@ -220,7 +220,7 @@ function set_cgroups_path() {
# Absolute path to container's cgroup v2.
if [ -v CGROUP_V2 ]; then
CGROUP_PATH=${CGROUP_BASE_PATH}${REL_CGROUPS_PATH}
CGROUP_V2_PATH=${CGROUP_BASE_PATH}${REL_CGROUPS_PATH}
fi
[ -v pod ] && create_parent
@@ -233,7 +233,7 @@ function set_cgroups_path() {
# $1: controller name (like "pids") or a file name (like "pids.max").
function get_cgroup_path() {
if [ -v CGROUP_V2 ]; then
echo "$CGROUP_PATH"
echo "$CGROUP_V2_PATH"
return
fi