Skip to content

tests/functional: improve handling flaky downloads

Daniel P. Berrangé qemu-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v13 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Simplifiy patch 2 - adding the URL was NOT in fact needed, as AssetError adds that automatically
- Avoid retries on URLError failures

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tests/functional: enable force refresh of cached assetsdocs/devel/testing/functional.rst tests/functional/qemu_test/asset.py+7 -01 reply
2/3tests/functional: fix formatting of exception argstests/functional/qemu_test/asset.py+1 -12 replies
3/3tests/functional: handle URLError when fetching assetstests/functional/qemu_test/asset.py+9 -12 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchThomas HuthRichard Henderson
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] tests/functional: improve handling flaky downloads

This fixes the functional-system-debian job with the currently awol archive.openwrt.org server.

https://gitlab.com/berrange/qemu/-/jobs/11173491503

We can see the download fail & retry, and then gracefully skip pre-cache:

2025-08-29 15:10:11,242 - qemu-test - INFO - Attempting to cache '/var/home/berrange/.cache/qemu/download/d3a01037f33e7512d46d50975588d5c3a0e0cbf25f37afab44775c2a2be523e6'
2025-08-29 15:10:11,242 - qemu-test - INFO - Downloading https://archive.openwrt.org/chaos_calmer/15.05.1/realview/generic/openwrt-15.05.1-realview-vmlinux-initramfs.elf to /var/home/berrange/.cache/qemu/download/d3a01037f33e7512d46d50975588d5c3a0e0cbf25f37afab44775c2a2be523e6...
2025-08-29 15:12:24,116 - qemu-test - ERROR - Unable to download https://archive.openwrt.org/chaos_calmer/15.05.1/realview/generic/openwrt-15.05.1-realview-vmlinux-initramfs.elf: URL error [Errno 110] Connection timed out
2025-08-29 15:12:24,116 - qemu-test - ERROR - https://archive.openwrt.org/chaos_calmer/15.05.1/realview/generic/openwrt-15.05.1-realview-vmlinux-initramfs.elf: Unable to download: URL error [Errno 110] Connection timed out: skipping asset precache

And then later the test itself is skipped:

55/67 qemu:func-thorough+func-arm-thorough+thorough / func-arm-realview SKIP 0.11s 0 subtests passed

Changed in v2:

- Simplifiy patch 2 - adding the URL was NOT in fact needed, as AssetError adds that automatically
- Avoid retries on URLError failures

Daniel P. Berrangé (3):
tests/functional: enable force refresh of cached assets tests/functional: fix formatting of exception args tests/functional: handle URLError when fetching assets

 docs/devel/testing/functional.rst   |  3 +++
 tests/functional/qemu_test/asset.py | 16 ++++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
Signature · 1 line
2.50.1