Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: bump shellcheck to 0.9.0, fix new SC2016 warnings #3889

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ jobs:
- uses: actions/checkout@v3
- name: install shellcheck
env:
VERSION: v0.8.0
VERSION: v0.9.0
BASEURL: https://github.com/koalaman/shellcheck/releases/download
SHA256: f4bce23c11c3919c1b20bcb0f206f6b44c44e26f2bc95f8aa708716095fa0651
SHA256: 7087178d54de6652b404c306233264463cb9e7a9afeb259bb663cc4dbfd64149
run: |
mkdir ~/bin
curl -sSfL --retry 5 $BASEURL/$VERSION/shellcheck-$VERSION.linux.x86_64.tar.xz |
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function check_cpu_quota() {
fi
check_cgroup_value "cpu.max" "$quota $period"
else
check_cgroup_value "cpu.cfs_quota_us" $quota
check_cgroup_value "cpu.cfs_quota_us" "$quota"
check_cgroup_value "cpu.cfs_period_us" "$period"
fi
# systemd values are the same for v1 and v2
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/hooks.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function setup() {

function teardown() {
if [ -v LIBPATH ]; then
umount "$LIBPATH"/$HOOKLIBCR.1.0.0 &>/dev/null || true
umount "$LIBPATH"/$HOOKLIBCC.1.0.0 &>/dev/null || true
rm -f $HOOKLIBCR.1.0.0 $HOOKLIBCC.1.0.0
umount "$LIBPATH/$HOOKLIBCR".1.0.0 &>/dev/null || true
umount "$LIBPATH/$HOOKLIBCC".1.0.0 &>/dev/null || true
rm -f "$HOOKLIBCR".1.0.0 "$HOOKLIBCC".1.0.0
unset LIBPATH HOOKLIBCR HOOKLIBCC
fi
teardown_bundle
Expand Down Expand Up @@ -52,8 +52,8 @@ function teardown() {
[ "$status" -eq 0 ]

echo "Checking create-runtime library"
echo "$output" | grep $HOOKLIBCR
echo "$output" | grep "$HOOKLIBCR"

echo "Checking create-container library"
echo "$output" | grep $HOOKLIBCC
echo "$output" | grep "$HOOKLIBCC"
}
12 changes: 6 additions & 6 deletions tests/integration/update.bats
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ function setup() {
# try to remove memory swap limit
runc update test_update --memory-swap -1
[ "$status" -eq 0 ]
check_cgroup_value "$MEM_SWAP" $SYSTEM_MEM
check_systemd_value "$SD_MEM_SWAP" $SD_UNLIMITED
check_cgroup_value "$MEM_SWAP" "$SYSTEM_MEM"
check_systemd_value "$SD_MEM_SWAP" "$SD_UNLIMITED"

# update memory swap
if [ -v CGROUP_V2 ]; then
Expand All @@ -123,13 +123,13 @@ function setup() {
[ "$status" -eq 0 ]

# check memory limit is gone
check_cgroup_value $MEM_LIMIT $SYSTEM_MEM
check_systemd_value $SD_MEM_LIMIT $SD_UNLIMITED
check_cgroup_value "$MEM_LIMIT" "$SYSTEM_MEM"
check_systemd_value "$SD_MEM_LIMIT" "$SD_UNLIMITED"

# check swap memory limited is gone
if [ "$HAVE_SWAP" = "yes" ]; then
check_cgroup_value $MEM_SWAP $SYSTEM_MEM
check_systemd_value "$SD_MEM_SWAP" $SD_UNLIMITED
check_cgroup_value "$MEM_SWAP" "$SYSTEM_MEM"
check_systemd_value "$SD_MEM_SWAP" "$SD_UNLIMITED"
fi

# update pids limit
Expand Down
Loading