Skip to content

Commit

Permalink
Merge pull request containers#17344 from openshift-cherrypick-robot/c…
Browse files Browse the repository at this point in the history
…herry-pick-17327-to-v4.4

[v4.4] system tests: fix volume exec/noexec test
  • Loading branch information
openshift-merge-robot authored Feb 3, 2023
2 parents 33574f5 + 6ce1a11 commit 3988540
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions test/system/160-volumes.bats
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,8 @@ EOF

# By default, volumes are mounted exec, but we have manually added the
# noexec option. This should fail.
# ARGH. Unfortunately, runc (used for cgroups v1) has different exit status
local expect_rc=126
if [[ $(podman_runtime) = "runc" ]]; then
expect_rc=1
fi
run_podman 126 run --rm --volume $myvolume:/vol:noexec,z $IMAGE /vol/myscript

run_podman ${expect_rc} run --rm --volume $myvolume:/vol:noexec,z $IMAGE /vol/myscript
# crun and runc emit different messages, and even runc is inconsistent
# with itself (output changed some time in 2022?). Deal with all.
assert "$output" =~ 'exec.* permission denied' "run on volume, noexec"
Expand Down

0 comments on commit 3988540

Please sign in to comment.