From bcffa9ce301cc0d69e589b7ffe51f4a5816603d9 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 17 Sep 2024 11:15:56 -0600 Subject: [PATCH] clean_setup: create pause image Workaround for #23292, where simultaneous 'pod create' commands will all start a podman-build of the pause image, but only one of them will be tagged, and the others will leak images. Signed-off-by: Ed Santiago --- test/system/helpers.bash | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/system/helpers.bash b/test/system/helpers.bash index 280729c5ab..c38273d78b 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -452,6 +452,17 @@ function clean_setup() { if [[ -z "$found_needed_image" ]]; then _prefetch $PODMAN_TEST_IMAGE_FQN fi + + # When running in parallel, load (create, actually) the pause image. + # This way, all pod tests will have it available. Without this, + # parallel pod tests will leave behind : images. + # FIXME: #23292 -- this should not be necessary. + if [[ -n "$PARALLEL_JOBSLOT" ]]; then + run_podman pod create mypod + run_podman pod rm mypod + # And now, we have a pause image, and each test does not + # need to build their own. + fi } # END setup/teardown tools