mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
system tests: fix volume exec/noexec test
The return code is "126" in the current version of runc. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user