mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-12 09:46:25 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user