Skip to content

Commit

Permalink
parallelize 010
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed Nov 7, 2024
1 parent ebb18a2 commit a04f8a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/system/010-images.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -410,19 +414,19 @@ 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
# Now remove all images in parallel and in the background and make sure
# 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}}"
Expand Down

0 comments on commit a04f8a9

Please sign in to comment.