qemu-cr16/tests/functional/qemu_test
Daniel P. Berrangé 097bbfc5e0 tests/functional: treat unknown exceptions as transient faults
To maximise the robustness of the functional tests we want to treat most
asset download failures as non-fatal to the test suite. Instead it
should just skip the tests which need that particular asset. The only
time aim to make it fatal is for 404 errors which are highly likely to
reflect genuine problems to be fixed.

We catch certain exception classes and handle them as transient errors,
but unfortunately it is proving difficult to predict what exception
classes urlopen() is capable of raising, with new possibilities being
discovered.

To provide a fail-safe, treat the generic Exception class as being a
transient error too. This may well mask certain genuine bugs, but it is
preferrable to prioritize running the test suite to the greatest extent
practical.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250918125746.1165658-3-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-09-24 08:26:11 +02:00
..
__init__.py tests/functional: add skipLockedMemoryTest decorator 2025-06-11 12:17:57 +02:00
archive.py tests/functional: replace 'run_cmd' with subprocess helpers 2024-12-17 19:39:53 +01:00
asset.py tests/functional: treat unknown exceptions as transient faults 2025-09-24 08:26:11 +02:00
cmd.py tests/functional: fix infinite loop on console EOF 2025-09-09 12:41:18 +02:00
config.py tests/functional: Introduce the dso_suffix() helper 2025-03-10 10:30:00 +00:00
decorators.py tests/functional: add skipLockedMemoryTest decorator 2025-06-11 12:17:57 +02:00
linuxkernel.py tests/functional: Move the code for testing HTTP downloads to a common function 2025-03-07 07:50:19 +01:00
ports.py tests/functional: Use more fine-grained locking when looking for free ports 2025-08-27 09:46:54 +02:00
tesseract.py tests/functional: replace 'run_cmd' with subprocess helpers 2024-12-17 19:39:53 +01:00
testcase.py tests/functional: purge scratch dir on test startup 2025-09-09 15:45:33 +02:00
tuxruntest.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
uncompress.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
utils.py tests/functional: Add a helper function for retrieving the hostfwd port 2024-12-17 20:33:29 +01:00