diff options
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/010-images.bats | 7 | ||||
-rw-r--r-- | test/system/030-run.bats | 17 | ||||
-rw-r--r-- | test/system/055-rm.bats | 7 | ||||
-rw-r--r-- | test/system/075-exec.bats | 2 | ||||
-rw-r--r-- | test/system/150-login.bats | 2 | ||||
-rw-r--r-- | test/system/160-volumes.bats | 7 | ||||
-rw-r--r-- | test/system/200-pod.bats | 8 | ||||
-rw-r--r-- | test/system/260-sdnotify.bats | 1 | ||||
-rw-r--r-- | test/system/410-selinux.bats | 3 | ||||
-rw-r--r-- | test/system/500-networking.bats | 9 | ||||
-rw-r--r-- | test/system/520-checkpoint.bats | 2 | ||||
-rw-r--r-- | test/system/helpers.bash | 10 |
12 files changed, 72 insertions, 3 deletions
diff --git a/test/system/010-images.bats b/test/system/010-images.bats index 638910302..aa390f236 100644 --- a/test/system/010-images.bats +++ b/test/system/010-images.bats @@ -317,4 +317,11 @@ Deleted: $pauseID" is "$output" "" } +@test "podman image rm --force bogus" { + run_podman 1 image rm bogus + is "$output" "Error: bogus: image not known" "Should print error" + run_podman image rm --force bogus + is "$output" "" "Should print no output" +} + # vim: filetype=sh diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 5014ef47b..908c169ee 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -3,6 +3,7 @@ load helpers @test "podman run - basic tests" { + skip_if_aarch64 "FIXME: #15074 - fails on aarch64" rand=$(random_string 30) err_no_such_cmd="Error:.*/no/such/command.*[Nn]o such file or directory" @@ -870,4 +871,20 @@ EOF run_podman container rm -fa } +@test "podman run failed --rm " { + port=$(random_free_port) + + # Run two containers with the same port bindings. The second must fail + run_podman run -p $port:80 --rm -d --name c_ok $IMAGE top + run_podman 126 run -p $port:80 -d --name c_fail_no_rm $IMAGE top + run_podman 126 run -p $port:80 --rm -d --name c_fail_with_rm $IMAGE top + # Prior to #15060, the third container would still show up in ps -a + run_podman ps -a --sort names --format '{{.Image}}--{{.Names}}' + is "$output" "$IMAGE--c_fail_no_rm +$IMAGE--c_ok" \ + "podman ps -a shows running & failed containers, but not failed-with-rm" + + run_podman container rm -f -t 0 c_ok c_fail_no_rm +} + # vim: filetype=sh diff --git a/test/system/055-rm.bats b/test/system/055-rm.bats index 0ef2216b8..dcd679a1f 100644 --- a/test/system/055-rm.bats +++ b/test/system/055-rm.bats @@ -96,4 +96,11 @@ load helpers run_podman 137 run --name $rand $IMAGE sleep 30 } +@test "podman container rm --force bogus" { + run_podman 1 container rm bogus + is "$output" "Error: no container with name or ID \"bogus\" found: no such container" "Should print error" + run_podman container rm --force bogus + is "$output" "" "Should print no output" +} + # vim: filetype=sh diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats index 0a6048b7e..7dd43c2c3 100644 --- a/test/system/075-exec.bats +++ b/test/system/075-exec.bats @@ -6,6 +6,8 @@ load helpers @test "podman exec - basic test" { + skip_if_aarch64 "FIXME: #15074 - fails on aarch64" + rand_filename=$(random_string 20) rand_content=$(random_string 50) diff --git a/test/system/150-login.bats b/test/system/150-login.bats index dc902d5fe..b57bb44ab 100644 --- a/test/system/150-login.bats +++ b/test/system/150-login.bats @@ -52,7 +52,7 @@ function setup() { mkdir -p $AUTHDIR # Registry image; copy of docker.io, but on our own registry - local REGISTRY_IMAGE="$PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/registry:2.7" + local REGISTRY_IMAGE="$PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/registry:2.8" # Pull registry image, but into a separate container storage mkdir -p ${PODMAN_LOGIN_WORKDIR}/root diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats index 18e806699..6829c6a78 100644 --- a/test/system/160-volumes.bats +++ b/test/system/160-volumes.bats @@ -473,4 +473,11 @@ EOF run_podman image rm --force localhost/volume_image } +@test "podman volume rm --force bogus" { + run_podman 1 volume rm bogus + is "$output" "Error: no volume with name \"bogus\" found: no such volume" "Should print error" + run_podman volume rm --force bogus + is "$output" "" "Should print no output" +} + # vim: filetype=sh diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats index 667e2baef..cbbd62ffb 100644 --- a/test/system/200-pod.bats +++ b/test/system/200-pod.bats @@ -478,6 +478,7 @@ spec: } @test "pod resource limits" { + # FIXME: #15074 - possible flake on aarch64 skip_if_remote "resource limits only implemented on non-remote" skip_if_rootless "resource limits only work with root" skip_if_cgroupsv1 "resource limits only meaningful on cgroups V2" @@ -547,4 +548,11 @@ io.max | $lomajmin rbps=1048576 wbps=1048576 riops=max wiops=max wait } +@test "podman pod rm --force bogus" { + run_podman 1 pod rm bogus + is "$output" "Error: .*bogus.*: no such pod" "Should print error" + run_podman pod rm --force bogus + is "$output" "" "Should print no output" +} + # vim: filetype=sh diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats index 59456de24..cd7b1262a 100644 --- a/test/system/260-sdnotify.bats +++ b/test/system/260-sdnotify.bats @@ -132,6 +132,7 @@ READY=1" "sdnotify sent MAINPID and READY" # These tests can fail in dev. environment because of SELinux. # quick fix: chcon -t container_runtime_exec_t ./bin/podman @test "sdnotify : container" { + skip_if_aarch64 "FIXME: #15074 - fails on aarch64 non-remote" # Sigh... we need to pull a humongous image because it has systemd-notify. # (IMPORTANT: fedora:32 and above silently removed systemd-notify; this # caused CI to hang. That's why we explicitly require fedora:31) diff --git a/test/system/410-selinux.bats b/test/system/410-selinux.bats index d437465a4..082482c7a 100644 --- a/test/system/410-selinux.bats +++ b/test/system/410-selinux.bats @@ -39,10 +39,12 @@ function check_label() { } @test "podman selinux: container with label=disable" { + skip_if_aarch64 "FIXME: #15074 - fails on aarch64" check_label "--security-opt label=disable" "spc_t" } @test "podman selinux: privileged container" { + skip_if_aarch64 "FIXME: #15074 - fails on aarch64" check_label "--privileged --userns=host" "spc_t" } @@ -63,6 +65,7 @@ function check_label() { } @test "podman selinux: pid=host" { + skip_if_aarch64 "FIXME: #15074 - fails on aarch64" # FIXME this test fails when run rootless with runc: # Error: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: readonly path /proc/asound: operation not permitted: OCI permission denied if is_rootless; then diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index f45540f5f..b9a173c2a 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -260,7 +260,7 @@ load helpers run_podman rm -t 0 -f $cid run_podman network rm $mynetname - run_podman 1 network rm -f $mynetname + run_podman 1 network rm $mynetname } @test "podman network reload" { @@ -760,4 +760,11 @@ EOF done } +@test "podman network rm --force bogus" { + run_podman 1 network rm bogus + is "$output" "Error: unable to find network with name or ID bogus: network not found" "Should print error" + run_podman network rm --force bogus + is "$output" "" "Should print no output" +} + # vim: filetype=sh diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index 7f60f01b3..7c8fc143a 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -12,7 +12,7 @@ function setup() { # could run to see if it's fixed, but it's way too complicated. Since # integration tests also skip checkpoint tests on Ubuntu, do the same here. if is_ubuntu; then - skip "FIXME: checkpointing broken in Ubuntu 2004, 2104, 2110, ..." + skip "FIXME: checkpointing broken in Ubuntu 2004, 2104, 2110, 2204, ..." fi # None of these tests work rootless.... diff --git a/test/system/helpers.bash b/test/system/helpers.bash index b9da2d89a..19bc6547c 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -379,6 +379,10 @@ function is_netavark() { return 1 } +function is_aarch64() { + [ "$(uname -m)" == "aarch64" ] +} + # Returns the OCI runtime *basename* (typically crun or runc). Much as we'd # love to cache this result, we probably shouldn't. function podman_runtime() { @@ -546,6 +550,12 @@ function skip_if_root_ubuntu { fi } +function skip_if_aarch64 { + if is_aarch64; then + skip "${msg:-Cannot run this test on aarch64 systems}" + fi +} + ######### # die # Abort with helpful message ######### |