diff options
author | Ed Santiago <santiago@redhat.com> | 2020-07-13 09:42:47 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-07-14 14:19:22 -0600 |
commit | fea3eea68bf483e33bae56d77071d5cb8ded91db (patch) | |
tree | 3c80909e3199be6b1ad0f39df2e0e7e7f59bde40 /test/system/075-exec.bats | |
parent | 50cd21e1811f4fe508a74dc316c81a047de4e8d9 (diff) | |
download | podman-fea3eea68bf483e33bae56d77071d5cb8ded91db.tar.gz podman-fea3eea68bf483e33bae56d77071d5cb8ded91db.tar.bz2 podman-fea3eea68bf483e33bae56d77071d5cb8ded91db.zip |
system tests: new tests for run, exec
- Issue #6735 : problem with multiple namespaces; confirms
combinations of --userns=keep-id, --privileged, --user=XX
- Issue #6829 : --userns=keep-id will add a /etc/passwd entry
- Issue #6593 : podman exec, with --userns=keep-id, errors
(test is currently skipped because issue remains live)
...and, addendum: add new helper function, remove_same_dev_warning.
Some CI systems issue a warning on podman run --privileged:
WARNING: The same type, major and minor should not be used for multiple devices.
We already had special-case code to ignore than in the SELinux
test, but now we're seeing it in the new run tests I added, so
I've refactored the "ignore this warning" code and written
tests for the removal code.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/075-exec.bats')
-rw-r--r-- | test/system/075-exec.bats | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats index f8c7f2766..945bcfa2d 100644 --- a/test/system/075-exec.bats +++ b/test/system/075-exec.bats @@ -6,8 +6,6 @@ load helpers @test "podman exec - basic test" { - skip_if_remote - rand_filename=$(random_string 20) rand_content=$(random_string 50) @@ -80,4 +78,24 @@ load helpers run_podman rm $cid } +# #6829 : add username to /etc/passwd inside container if --userns=keep-id +# #6593 : doesn't actually work with podman exec +@test "podman exec - with keep-id" { + skip "Please enable once #6593 is fixed" + + run_podman run -d --userns=keep-id $IMAGE sh -c \ + "echo READY;while [ ! -f /stop ]; do sleep 1; done" + cid="$output" + wait_for_ready $cid + + run_podman exec $cid id -un + is "$output" "$(id -un)" "container is running as current user" + + # Until #6593 gets fixed, this just hangs. The server process barfs with: + # unable to find user <username>: no matching entries in passwd file + run_podman exec --user=$(id -un) $cid touch /stop + run_podman wait $cid + run_podman rm $cid +} + # vim: filetype=sh |