diff mbox series

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

Message ID 20241203091036.59898-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. 3, 2024, 9:10 a.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 | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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