qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] tests/functional: Don't fail any precaching errors
@ 2025-03-11 13:13 Nicholas Piggin
  2025-03-11 13:37 ` Daniel P. Berrangé
  0 siblings, 1 reply; 8+ messages in thread
From: Nicholas Piggin @ 2025-03-11 13:13 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Nicholas Piggin, Philippe Mathieu-Daudé,
	Daniel P. Berrangé, qemu-devel

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 #bad
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
-
                     log.debug(f"HTTP error {e.code} from {asset.url} " +
                               "skipping asset precache")
+                except:
+                    log.debug(f"Error from {asset.url} " +
+                              "skipping asset precache")
 
         log.removeHandler(handler)
 
-- 
2.47.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-03-12  6:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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é
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

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).