From 579ec81b6070cf83ff1f5ed3477b0aab08c04f9e Mon Sep 17 00:00:00 2001 From: Lucas Caudill Date: Thu, 2 May 2024 18:14:10 +0000 Subject: [PATCH] ignore seemingly erroneous SC error --- test/common.bash | 6 +++--- test/run/ch-run_misc.bats | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/common.bash b/test/common.bash index 68abb8622..81bc516ef 100644 --- a/test/common.bash +++ b/test/common.bash @@ -330,9 +330,9 @@ export BATS_TMPDIR=$btnew [[ $(stat -c %a "$BATS_TMPDIR") = '700' ]] # ch-run exit codes (see also: ch_misc.h) -export CH_ERR_RUN=57 -export CH_ERR_CMD=58 -export CH_ERR_SQUASH=59 # Currently not used, here just in case +CH_ERR_RUN=57 +CH_ERR_CMD=58 +CH_ERR_SQUASH=59 # Currently not used, here just in case ch_runfile=$(command -v ch-run) diff --git a/test/run/ch-run_misc.bats b/test/run/ch-run_misc.bats index 1d3960264..157695785 100644 --- a/test/run/ch-run_misc.bats +++ b/test/run/ch-run_misc.bats @@ -18,6 +18,7 @@ demand-overlayfs () { @test 'relative path to image' { # issue #6 scope full + # shellcheck disable=SC2154 cd "$(dirname "$ch_timg")" && ch-run "$(basename "$ch_timg")" -- /bin/true } @@ -86,7 +87,7 @@ EOF [[ $USER ]] # default: no change - # shellcheck disable=SC2016 + # shellcheck disable=SC2016,SC2154 run ch-run "${ch_imgdir}"/quick -- /bin/sh -c 'echo $HOME' echo "$output" [[ $status -eq 0 ]] @@ -142,6 +143,7 @@ EOF scope quick echo "$PATH" # if /bin is in $PATH, latter passes through unchanged + # shellcheck disable=SC2154 PATH2="$ch_bin:/bin:/usr/bin" echo "$PATH2" # shellcheck disable=SC2016 @@ -171,6 +173,7 @@ EOF scope standard old_path=$PATH unset PATH + # shellcheck disable=SC2154 run "$ch_runfile" "$ch_timg" -- \ /usr/bin/python3 -c 'import os; print(os.getenv("PATH") is None)' PATH=$old_path @@ -269,6 +272,7 @@ EOF } rm-img + # shellcheck disable=SC2154 ch-convert "$ch_tardir"/chtest.* "$img" ls -l "$img" mkdir "$img"/foo