tests/int/*bats: fix/ignore shellcheck SC2046

Fix or ignore warnings like this one:

> In cgroups.bats line 107:
>             if [ $(id -u) = "0" ]; then
>                  ^------^ SC2046: Quote this to prevent word splitting.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2020-08-09 14:14:12 -07:00
parent 4ba4baea0e
commit 08766b9848
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -104,9 +104,10 @@ function setup() {
[ "$status" -eq 0 ]
if [ "$CGROUP_UNIFIED" != "no" ]; then
if [ -n "${RUNC_USE_SYSTEMD}" ] ; then
if [ $(id -u) = "0" ]; then
if [ "$(id -u)" = "0" ]; then
check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/machine.slice/cgroup.controllers)"
else
# shellcheck disable=SC2046
check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/cgroup.controllers)"
fi
else
+1 -1
View File
@@ -152,7 +152,7 @@ EOF
[ -e pid.txt ]
#wait user process to finish
timeout 1 tail --pid=$(head -n 1 pid.txt) -f /dev/null
timeout 1 tail --pid="$(head -n 1 pid.txt)" -f /dev/null
tty_info=$( cat <<EOF
{