summaryrefslogtreecommitdiff
path: root/test/system/075-exec.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/075-exec.bats')
-rw-r--r--test/system/075-exec.bats9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats
index b2c49510a..aa6e2bd28 100644
--- a/test/system/075-exec.bats
+++ b/test/system/075-exec.bats
@@ -19,6 +19,15 @@ load helpers
run_podman exec $cid sh -c "cat /$rand_filename"
is "$output" "$rand_content" "Can exec and see file in running container"
+
+ # Specially defined situations: exec a dir, or no such command.
+ # We don't check the full error message because runc & crun differ.
+ run_podman 126 exec $cid /etc
+ is "$output" ".*permission denied" "podman exec /etc"
+ run_podman 127 exec $cid /no/such/command
+ is "$output" ".*such file or dir" "podman exec /no/such/command"
+
+ # Done
run_podman exec $cid rm -f /$rand_filename
run_podman wait $cid