From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 5/8] tests/functional/asset: Fail assert fetch when retries are exceeded
Date: Thu, 13 Mar 2025 09:01:29 +0100 [thread overview]
Message-ID: <20250313080132.1467625-6-thuth@redhat.com> (raw)
In-Reply-To: <20250313080132.1467625-1-thuth@redhat.com>
From: Nicholas Piggin <npiggin@gmail.com>
Currently the fetch code does not fail gracefully when retry limit is
exceeded, it just falls through the loop with no file, which ends up
hitting other errors.
Add a check for non-existing file, which indicates the retry limit was
exceeded.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20250312130002.945508-2-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/functional/qemu_test/asset.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py
index f0730695f09..27dd839e705 100644
--- a/tests/functional/qemu_test/asset.py
+++ b/tests/functional/qemu_test/asset.py
@@ -138,6 +138,9 @@ def fetch(self):
tmp_cache_file.unlink()
raise
+ if not os.path.exists(tmp_cache_file):
+ raise Exception("Retries exceeded downloading %s", self.url)
+
try:
# Set these just for informational purposes
os.setxattr(str(tmp_cache_file), "user.qemu-asset-url",
--
2.48.1
next prev parent reply other threads:[~2025-03-13 8:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 8:01 [PULL 0/8] Fixes for functional tests Thomas Huth
2025-03-13 8:01 ` [PULL 1/8] docs: Rename default-configs to configs Thomas Huth
2025-03-13 8:01 ` [PULL 2/8] tests/functional: Require 'user' netdev for ppc64 e500 test Thomas Huth
2025-03-13 8:01 ` [PULL 3/8] tests/functional: Bump up arm_replay timeout Thomas Huth
2025-03-13 8:01 ` [PULL 4/8] docs/system: Fix the information on how to run certain functional tests Thomas Huth
2025-03-13 8:01 ` Thomas Huth [this message]
2025-03-13 8:01 ` [PULL 6/8] tests/functional/asset: Verify downloaded size Thomas Huth
2025-03-13 8:01 ` [PULL 7/8] tests/functional/asset: Add AssetError exception class Thomas Huth
2025-03-13 8:01 ` [PULL 8/8] tests/functional: skip vulkan test if missing vulkaninfo Thomas Huth
2025-03-14 4:46 ` [PULL 0/8] Fixes for functional tests Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250313080132.1467625-6-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).