summaryrefslogtreecommitdiff
path: root/test/system/160-volumes.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-18 20:37:20 +0200
committerGitHub <noreply@github.com>2020-05-18 20:37:20 +0200
commitd6d45003c926ae5587177eab0d195c14d4286126 (patch)
tree6f4b9b52d8d4d7f49cd7cf7f21e8c03852e510c7 /test/system/160-volumes.bats
parentd4587c6074e4b4e3673cf495f0c4cd2811742791 (diff)
parentcd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4 (diff)
downloadpodman-d6d45003c926ae5587177eab0d195c14d4286126.tar.gz
podman-d6d45003c926ae5587177eab0d195c14d4286126.tar.bz2
podman-d6d45003c926ae5587177eab0d195c14d4286126.zip
Merge pull request #6232 from edsantiago/bats_cgroupsv1_fixes
system tests: small fixes for rawhide+cgroups v1
Diffstat (limited to 'test/system/160-volumes.bats')
-rw-r--r--test/system/160-volumes.bats13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats
index cd9f3c8ad..5d65a950f 100644
--- a/test/system/160-volumes.bats
+++ b/test/system/160-volumes.bats
@@ -116,8 +116,17 @@ EOF
chmod 755 $mountpoint/myscript
# By default, volumes are mounted noexec. This should fail.
- run_podman 126 run --rm --volume $myvolume:/vol:z $IMAGE /vol/myscript
- is "$output" ".* OCI runtime permission denied.*" "run on volume, noexec"
+ # ARGH. Unfortunately, runc (used for cgroups v1) produces a different error
+ local expect_rc=126
+ local expect_msg='.* OCI runtime permission denied.*'
+ run_podman info --format '{{ .Host.OCIRuntime.Path }}'
+ if expr "$output" : ".*/runc"; then
+ expect_rc=1
+ expect_msg='.* exec user process caused.*permission denied'
+ fi
+
+ run_podman ${expect_rc} run --rm --volume $myvolume:/vol:z $IMAGE /vol/myscript
+ is "$output" "$expect_msg" "run on volume, noexec"
# With exec, it should pass
run_podman run --rm -v $myvolume:/vol:z,exec $IMAGE /vol/myscript