Skip to content

Commit

Permalink
tests/int/*bats: fix/ignore shellcheck SC2046
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kolyshkin committed Aug 10, 2020
1 parent 6794df9 commit c524e90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/integration/cgroups.bats
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/tty.bats
Expand Up @@ -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
{
Expand Down

0 comments on commit c524e90

Please sign in to comment.