diff mbox series

[PATCH-for-9.2?,2/2] tests/functional/test_empty_cpu_model: Use QTest accelerator

Message ID 20241202204020.55665-3-philmd@linaro.org
State New
Headers show
Series tests/functional: Fix tests failing when TCG is not available on macOS | expand

Commit Message

Philippe Mathieu-Daudé Dec. 2, 2024, 8:40 p.m. UTC
When testing with a HVF-only binary, we get:

   3/12 qemu:func-quick+func-aarch64 / func-aarch64-empty_cpu_model                              ERROR            0.62s   exit status 1
  stderr:
  Traceback (most recent call last):
    File "tests/functional/test_empty_cpu_model.py", line 21, in test
      self.assertRegex(self.vm.get_log(), r'-cpu option cannot be empty')
  AssertionError: Regex didn't match: '-cpu option cannot be empty' not found in 'qemu-system-aarch64: No accelerator selected and no default accelerator available\n'

Explicit the QTest accelerator to be able to run the test.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tests/functional/test_empty_cpu_model.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/functional/test_empty_cpu_model.py b/tests/functional/test_empty_cpu_model.py
index 0081b06d85a..16ce1892d84 100755
--- a/tests/functional/test_empty_cpu_model.py
+++ b/tests/functional/test_empty_cpu_model.py
@@ -13,7 +13,7 @@ 
 
 class EmptyCPUModel(QemuSystemTest):
     def test(self):
-        self.vm.add_args('-S', '-display', 'none', '-machine', 'none', '-cpu', '')
+        self.vm.add_args('-S', '-display', 'none', '-machine', 'none,accel=qtest', '-cpu', '')
         self.vm.set_qmp_monitor(enabled=False)
         self.vm.launch()
         self.vm.wait()