From 6897fc9ef6bdf6a529276d9deb47dd3bfd757958 Mon Sep 17 00:00:00 2001 From: Rolv Apneseth Date: Thu, 25 Jun 2026 14:48:22 +0100 Subject: [PATCH 1/2] test/system: Style fixes Fallout from the following: * 61e2c970f821221f43ac7831849497236fbd5eb0 * d5daa7167e89cc98eafe22e94dde5bdcd58de013 * ecd1ced719742a6faea4d0cf41d68391f5644b4e * 7a5f3ba2e2a0f0b73721105233e787bdf9284f34 https://github.com/containers/toolbox/pull/1811 https://github.com/containers/toolbox/pull/1815 --- test/system/libs/helpers.bash | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/test/system/libs/helpers.bash b/test/system/libs/helpers.bash index 4b48c7009..cb7219e50 100644 --- a/test/system/libs/helpers.bash +++ b/test/system/libs/helpers.bash @@ -116,9 +116,10 @@ function _pull_and_cache_distro_image() { local -i ret_val for ((j = 0; j < num_of_retries; j++)); do - error_message="$( (skopeo copy --dest-compress \ - "docker://${image}" \ - "dir:${IMAGE_CACHE_DIR}/${image_archive}" >/dev/null) 2>&1)" + error_message="$( (skopeo copy \ + --dest-compress \ + "docker://${image}" \ + "dir:${IMAGE_CACHE_DIR}/${image_archive}" >/dev/null) 2>&1)" ret_val="$?" if [ "$ret_val" -eq 0 ]; then @@ -211,9 +212,10 @@ function _setup_docker_registry() { assert_success # Add fedora-toolbox:34 image to the registry - run skopeo copy --dest-authfile "${BATS_SUITE_TMPDIR}/authfile.json" \ - dir:"${IMAGE_CACHE_DIR}"/fedora-toolbox-34 \ - docker://"${DOCKER_REG_URI}"/fedora-toolbox:34 + run skopeo copy \ + --dest-authfile "${BATS_SUITE_TMPDIR}/authfile.json" \ + dir:"${IMAGE_CACHE_DIR}"/fedora-toolbox-34 \ + docker://"${DOCKER_REG_URI}"/fedora-toolbox:34 assert_success run rm "${BATS_SUITE_TMPDIR}/authfile.json" @@ -331,7 +333,9 @@ function pull_distro_image() { fi # https://github.com/containers/skopeo/issues/547 for the options for containers-storage - run skopeo copy "dir:${IMAGE_CACHE_DIR}/${image_archive}" "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]${image}" + run skopeo copy \ + "dir:${IMAGE_CACHE_DIR}/${image_archive}" \ + "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]${image}" # shellcheck disable=SC2154 if [ "$status" -ne 0 ]; then @@ -364,8 +368,8 @@ function pull_default_image_and_copy() { # https://github.com/containers/skopeo/issues/547 for the options for containers-storage run skopeo copy \ - "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image" \ - "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image-copy" + "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image" \ + "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image-copy" if [ "$status" -ne 0 ]; then echo "Failed to copy image $image to $image-copy" From 4c92e6317366c4e4f0e48bcb3558a054b99341b4 Mon Sep 17 00:00:00 2001 From: Rolv Apneseth Date: Fri, 3 Jul 2026 20:46:32 +0200 Subject: [PATCH 2/2] test/system: Prevent skopeo(1) from hanging indefinitely For some reason, calls to 'skopeo copy' to populate the local temporary Docker registry are sometimes hanging indefinitely. Everything was fine on the 28th of May [1]. The problem started with Fedora Rawhide on the 30th of May [2], and spread to Fedora 44 on the 4th of June [3]. Avoid the indefinite hangs and make skopeo(1) fail sooner by using reasonable timeouts - longer for remote network I/O and shorter for local. [1] https://github.com/containers/toolbox/pull/1799 [2] https://github.com/containers/toolbox/pull/1798 [3] https://github.com/containers/toolbox/pull/1769 https://github.com/containers/toolbox/pull/1811 https://github.com/containers/toolbox/pull/1815 Signed-off-by: Rolv Apneseth --- test/system/libs/helpers.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/system/libs/helpers.bash b/test/system/libs/helpers.bash index cb7219e50..e26d0bd6a 100644 --- a/test/system/libs/helpers.bash +++ b/test/system/libs/helpers.bash @@ -116,7 +116,7 @@ function _pull_and_cache_distro_image() { local -i ret_val for ((j = 0; j < num_of_retries; j++)); do - error_message="$( (skopeo copy \ + error_message="$( (skopeo --command-timeout 10m copy \ --dest-compress \ "docker://${image}" \ "dir:${IMAGE_CACHE_DIR}/${image_archive}" >/dev/null) 2>&1)" @@ -212,7 +212,7 @@ function _setup_docker_registry() { assert_success # Add fedora-toolbox:34 image to the registry - run skopeo copy \ + run skopeo --command-timeout 60s copy \ --dest-authfile "${BATS_SUITE_TMPDIR}/authfile.json" \ dir:"${IMAGE_CACHE_DIR}"/fedora-toolbox-34 \ docker://"${DOCKER_REG_URI}"/fedora-toolbox:34 @@ -333,7 +333,7 @@ function pull_distro_image() { fi # https://github.com/containers/skopeo/issues/547 for the options for containers-storage - run skopeo copy \ + run skopeo --command-timeout 60s copy \ "dir:${IMAGE_CACHE_DIR}/${image_archive}" \ "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]${image}" @@ -367,7 +367,7 @@ function pull_default_image_and_copy() { image="${IMAGES[$distro]}:$version" # https://github.com/containers/skopeo/issues/547 for the options for containers-storage - run skopeo copy \ + run skopeo --command-timeout 60s copy \ "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image" \ "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image-copy"