tests/int/update.bats: fix a shellcheck warning

Fixes the following warning:

> In update.bats line 422:
>     local root_period=$(cat "${CGROUP_CPU_BASE_PATH}/cpu.rt_period_us")
>           ^---------^ SC2155: Declare and assign separately to avoid masking return values.
>
>
> In update.bats line 423:
>     local root_runtime=$(cat "${CGROUP_CPU_BASE_PATH}/cpu.rt_runtime_us")
>           ^----------^ SC2155: Declare and assign separately to avoid masking return values.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-08-09 13:41:46 -07:00
parent 82836d2429
commit 612d079086
1 changed files with 3 additions and 2 deletions

View File

@ -419,8 +419,9 @@ EOF
# #
# TODO: support systemd # TODO: support systemd
mkdir -p "$CGROUP_CPU" mkdir -p "$CGROUP_CPU"
local root_period=$(cat "${CGROUP_CPU_BASE_PATH}/cpu.rt_period_us") local root_period root_runtime
local root_runtime=$(cat "${CGROUP_CPU_BASE_PATH}/cpu.rt_runtime_us") 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") # 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 <<< $(echo ${CGROUP_CPU} | sed -e s@^${CGROUP_CPU_BASE_PATH}/@@)
for (( i = 0; i < ${#dirs[@]}; i++ )); do for (( i = 0; i < ${#dirs[@]}; i++ )); do