Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
ignore seemingly erroneous SC error
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaudill committed May 2, 2024
1 parent 9d74d19 commit 579ec81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 5 additions & 1 deletion test/run/ch-run_misc.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 ]]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -269,6 +272,7 @@ EOF
}

rm-img
# shellcheck disable=SC2154
ch-convert "$ch_tardir"/chtest.* "$img"
ls -l "$img"
mkdir "$img"/foo
Expand Down

0 comments on commit 579ec81

Please sign in to comment.