Skip to content

Commit af386d1

Browse files
committed
tests/int: rm some "shellcheck disable" annotations
Those are no longer needed with shellcheck v0.10.0 (possibly with an earlier version, too, but I am too lazy to check that). While at it, fix a typo in the comment. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent b48dd65 commit af386d1

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

tests/integration/hooks.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ function teardown() {
2121
@test "runc create [hook fails]" {
2222
for hook in prestart createRuntime createContainer; do
2323
echo "testing hook $hook"
24-
# shellcheck disable=SC2016
2524
update_config '.hooks |= {"'$hook'": [{"path": "/bin/true"}, {"path": "/bin/false"}]}'
2625
runc create --console-socket "$CONSOLE_SOCKET" test_hooks
2726
[ "$status" -ne 0 ]
@@ -34,7 +33,6 @@ function teardown() {
3433
# All hooks except Poststop.
3534
for hook in prestart createRuntime createContainer startContainer poststart; do
3635
echo "testing hook $hook"
37-
# shellcheck disable=SC2016
3836
update_config '.hooks |= {"'$hook'": [{"path": "/bin/true"}, {"path": "/bin/false"}]}'
3937
runc run "test_hook-$hook"
4038
[[ "$output" != "Hello World" ]]

tests/integration/run.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ function teardown() {
8484
chmod 'a=rwx,ug+s,+t' rootfs/tmp # set all bits
8585
mode=$(stat -c %A rootfs/tmp)
8686

87-
# shellcheck disable=SC2016
8887
update_config '.process.args = ["sh", "-c", "stat -c %A /tmp"]'
8988
update_config '.mounts += [{"destination": "/tmp", "type": "tmpfs", "source": "tmpfs", "options":["noexec","nosuid","nodev","rprivate"]}]'
9089

@@ -94,7 +93,6 @@ function teardown() {
9493
}
9594

9695
@test "runc run with tmpfs perms" {
97-
# shellcheck disable=SC2016
9896
update_config '.process.args = ["sh", "-c", "stat -c %a /tmp/test"]'
9997
update_config '.mounts += [{"destination": "/tmp/test", "type": "tmpfs", "source": "tmpfs", "options": ["mode=0444"]}]'
10098

@@ -113,14 +111,12 @@ function teardown() {
113111
# so it should use the directory's perms.
114112
update_config '.mounts[-1].options = []'
115113
chmod 0710 rootfs/tmp/test
116-
# shellcheck disable=SC2016
117114
runc run test_tmpfs
118115
[ "$status" -eq 0 ]
119116
[ "${lines[0]}" = "710" ]
120117

121118
# Add back the mode on the mount, and it should use that instead.
122119
# Just for fun, use different perms than was used earlier.
123-
# shellcheck disable=SC2016
124120
update_config '.mounts[-1].options = ["mode=0410"]'
125121
runc run test_tmpfs
126122
[ "$status" -eq 0 ]

tests/integration/seccomp-notify.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function scmp_act_notify_template() {
183183
@test "runc run [seccomp] (SCMP_ACT_NOTIFY startContainer hook)" {
184184
# shellcheck disable=SC2016
185185
# We use single quotes to properly delimit the $1 param to
186-
# update_config(), but this shellshcheck is quite silly and fails if the
186+
# update_config(), but shellcheck is quite silly and fails if the
187187
# multi-line string includes some $var (even when it is properly outside of the
188188
# single quotes) or when we use this syntax to execute commands in the
189189
# string: $(command).

tests/integration/tty.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ function teardown() {
123123

124124
# replace "uid": 0 with "uid": 1000
125125
# and do a similar thing for gid.
126-
# shellcheck disable=SC2016
127126
update_config ' (.. | select(.uid? == 0)) .uid |= 1000
128127
| (.. | select(.gid? == 0)) .gid |= 100'
129128

0 commit comments

Comments
 (0)