On 19/02/2025 15.24, Philippe Mathieu-Daudé wrote:
Not all binaries contain the same set of devices. Since some
tests depend on specific devices, we need to check their
availability in the binary.

QemuSystemTest::require_device() allows for system tests to
explicitly check for a particular device. Add a similar
check_required_devices() method which check all devices
requested on the command line. If a device is missing, the
test is skipped.

Example running test_aarch64_virt.py on macOS:

   ok 1 test_aarch64_virt.Aarch64VirtMachine.test_aarch64_virt_with_gpu # SKIP 
no support for device virtio-gpu-gl-pci

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
Just an idea to see if we can avoid manual require_device() calls.
However not having a device in binary might also be a bug, so RFC...

I'm also a little bit torn by this question ... let's keep it explicit for now, but if the require_device() calls get too annoying one day, we can reconsider.

 Thomas


Reply via email to