From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [RFC PATCH] tests/functional: Don't fail any precaching errors
Date: Tue, 11 Mar 2025 13:37:55 +0000 [thread overview]
Message-ID: <Z9A8swNn6zBm57jC@redhat.com> (raw)
In-Reply-To: <20250311131327.903329-1-npiggin@gmail.com>
On Tue, Mar 11, 2025 at 11:13:26PM +1000, Nicholas Piggin wrote:
> The NetBSD archive is currently failing part-way through downloads,
> which results in no clean HTTP error but a short transfer and checksum
> error. This is treated as fatal in the precache download, and it halts
> an entire set of tests even if some others could run.
>
> I hacked up this patch to get a bunch of CI tests going again for ppc
> merge testing.
>
> Don't treat any precaching failures as errors.
> This causes tests to be skipped when they try to fetch their asset.
> Some CI results before/after patching:
>
> functional-system-fedora
> https://gitlab.com/npiggin/qemu/-/jobs/9370860490 #bad
> https://gitlab.com/npiggin/qemu/-/jobs/9373246826 #good
>
> functional-system-debian
> https://gitlab.com/npiggin/qemu/-/jobs/9370860479 #bda
> https://gitlab.com/npiggin/qemu/-/jobs/9373246822 #good
>
> This is making the tests skip. Is there a way to make the error more
> prominent / obvious in the output? Should they fail instead? I think
> there should be a more obvious indication of failure due to asset so
> it does not go unnoticed.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> tests/functional/qemu_test/asset.py | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py
> index f0730695f09..3134ccb10da 100644
> --- a/tests/functional/qemu_test/asset.py
> +++ b/tests/functional/qemu_test/asset.py
> @@ -174,14 +174,11 @@ def precache_test(test):
> try:
> asset.fetch()
> except HTTPError as e:
> - # Treat 404 as fatal, since it is highly likely to
> - # indicate a broken test rather than a transient
> - # server or networking problem
> - if e.code == 404:
> - raise
> -
Why are you removing this ? The commit above does not make any reference
to the problem being a missing URL (404 code). We want missing URLs to
be fatal so that we identify when images we rely on are deleted by their
host, as that is not a transient problem.
> log.debug(f"HTTP error {e.code} from {asset.url} " +
> "skipping asset precache")
> + except:
> + log.debug(f"Error from {asset.url} " +
> + "skipping asset precache")
So is the bit that actually deals with the exception you show in the
jobs above.
Best practice would be for us to define an 'AssetException' and use that
in assert.py when raising exceptions, or to wrap other exceptions in cases
where we propagate exceptions. Then this code can be move tailored to
catch AssetException, instead of Exception.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-03-11 13:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 13:13 [RFC PATCH] tests/functional: Don't fail any precaching errors Nicholas Piggin
2025-03-11 13:37 ` Daniel P. Berrangé [this message]
2025-03-11 13:55 ` Thomas Huth
2025-03-11 14:11 ` Daniel P. Berrangé
2025-03-12 5:54 ` Nicholas Piggin
2025-03-11 23:41 ` Nicholas Piggin
2025-03-12 6:36 ` Thomas Huth
2025-03-12 6:55 ` Nicholas Piggin
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=Z9A8swNn6zBm57jC@redhat.com \
--to=berrange@redhat.com \
--cc=npiggin@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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).