tests/int/update.bats: fix a shellcheck warning
This fixes the following warning, and implements a suggestion: > In update.bats line 426: > IFS='/' read -r -a dirs <<< $(echo ${CGROUP_CPU} | sed -e s@^${CGROUP_CPU_BASE_PATH}/@@) > ^-- SC2046: Quote this to prevent word splitting. > ^-- SC2001: See if you can use ${variable//search/replace} instead. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
612d079086
commit
3b80850eaa
|
@ -423,7 +423,7 @@ EOF
|
|||
root_period=$(cat "${CGROUP_CPU_BASE_PATH}/cpu.rt_period_us")
|
||||
root_runtime=$(cat "${CGROUP_CPU_BASE_PATH}/cpu.rt_runtime_us")
|
||||
# the following IFS magic sets dirs=("runc-cgroups-integration-test" "test-cgroup")
|
||||
IFS='/' read -r -a dirs <<< $(echo ${CGROUP_CPU} | sed -e s@^${CGROUP_CPU_BASE_PATH}/@@)
|
||||
IFS='/' read -r -a dirs <<< "${CGROUP_CPU//${CGROUP_CPU_BASE_PATH}/}"
|
||||
for (( i = 0; i < ${#dirs[@]}; i++ )); do
|
||||
local target="$CGROUP_CPU_BASE_PATH"
|
||||
for (( j = 0; j <= i; j++ )); do
|
||||
|
|
Loading…
Reference in New Issue