From aee9d3ce5196785d566b6992f5f6c3207733fc05 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Thu, 31 Oct 2024 15:12:04 -0600 Subject: [PATCH] parallelize 010 Signed-off-by: Ed Santiago --- test/system/010-images.bats | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/system/010-images.bats b/test/system/010-images.bats index a0beda41f6..c2e4a129d5 100644 --- a/test/system/010-images.bats +++ b/test/system/010-images.bats @@ -305,6 +305,7 @@ Deleted: $pauseID" run_podman image exists $IMAGE } +# bats test_tags=ci:parallel @test "podman rmi --ignore" { random_image_name=i_$(safename) run_podman 1 rmi $random_image_name @@ -313,6 +314,7 @@ Deleted: $pauseID" is "$output" "" } +# bats test_tags=ci:parallel @test "podman image rm --force bogus" { run_podman 1 image rm bogus is "$output" "Error: bogus: image not known" "Should print error" @@ -328,6 +330,7 @@ Deleted: $pauseID" assert "$output" !~ "$random_image_name" "image must be removed" } +# bats test_tags=ci:parallel @test "podman images - commit docker with comment" { cname=c_$(safename) iname=i_$(safename) @@ -400,6 +403,7 @@ EOF run_podman --root $imstore/root rmi --all } +# bats test_tags=ci:parallel @test "podman images with concurrent removal" { skip_if_remote "following test is not supported for remote clients" local count=5 @@ -410,7 +414,7 @@ EOF FROM $IMAGE RUN echo $i EOF - run_podman build -q -t i$i $PODMAN_TMPDIR + run_podman build -q -t img-$i-$(safename) $PODMAN_TMPDIR done run_podman images @@ -418,11 +422,11 @@ EOF # that listing all images does not fail (see BZ 2216700). for i in $(seq --format '%02g' 1 $count); do timeout --foreground -v --kill=10 60 \ - $PODMAN rmi i$i & + $PODMAN rmi img-$i-$(safename) & done tries=100 - while [[ ${#lines[*]} -gt 1 ]] && [[ $tries -gt 0 ]]; do + while [[ "$output" =~ "$(safename)" ]] && [[ $tries -gt 0 ]]; do # Prior to #18980, 'podman images' during rmi could fail with 'image not known' # '0+w' because we sometimes get warnings. run_podman 0+w images --format "{{.ID}} {{.Names}}"