diff options
author | Ed Santiago <santiago@redhat.com> | 2020-05-14 09:55:25 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-05-14 09:55:25 -0600 |
commit | cd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4 (patch) | |
tree | 426319bbda082dfd2f9f7c156fb80b2354ead821 /test/system/160-volumes.bats | |
parent | 7e9ed37c0997d6dd2d6fc6ed6476039ee954286c (diff) | |
download | podman-cd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4.tar.gz podman-cd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4.tar.bz2 podman-cd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4.zip |
system tests: small fixes for rawhide+cgroups v1
Three small fixes for breaking tests on rawhide:
1) run test: looks like runc changed the format of
an error message, adding a colon in one place.
runc is used on rawhide when booted in cgroups v1
2) volumes test: difference in exit status and error
message between runc and crun.
3) systemd test: define XDG_RUNTIME_DIR if unset.
podman helpfully sets this to a reasonable default,
but the 'systemctl' commands used in this test do not.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/160-volumes.bats')
-rw-r--r-- | test/system/160-volumes.bats | 13 |
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 |