From 68371ff550aa97cfa8d826195e7da1290ac11b9a Mon Sep 17 00:00:00 2001 From: Toshiki Sonoda Date: Thu, 2 Feb 2023 18:18:28 +0900 Subject: [PATCH] system tests: fix volume exec/noexec test The return code is "126" in the current version of runc. Signed-off-by: Toshiki Sonoda --- test/system/160-volumes.bats | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats index 4bdbb41cee..7c8e4610de 100644 --- a/test/system/160-volumes.bats +++ b/test/system/160-volumes.bats @@ -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"