diff mbox series

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

Message ID 20241202204020.55665-2-philmd@linaro.org (mailing list archive)
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-version                                      ERROR            0.29s   exit status 1
  stderr:
  Traceback (most recent call last):
    File "tests/functional/test_version.py", line 22, in test_qmp_human_info_version
      self.vm.launch()
    File "machine/machine.py", line 461, in launch
      raise VMLaunchFailure(
  qemu.machine.machine.VMLaunchFailure: ConnectError: Failed to establish session: EOFError
      Exit code: 1
      Command: build/qemu-system-aarch64 -display none -vga none -chardev socket,id=mon,fd=5 -mon chardev=mon,mode=control -machine none -nodefaults
      Output: qemu-system-aarch64: No accelerator selected and no default accelerator available

Explicit the QTest accelerator to be able to run the HMP command.

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

Patch

diff --git a/tests/functional/test_version.py b/tests/functional/test_version.py
index 3ab3b67f7e3..477d3908d8a 100755
--- a/tests/functional/test_version.py
+++ b/tests/functional/test_version.py
@@ -17,7 +17,7 @@ 
 class Version(QemuSystemTest):
 
     def test_qmp_human_info_version(self):
-        self.set_machine('none')
+        self.set_machine('none,accel=qtest')
         self.vm.add_args('-nodefaults')
         self.vm.launch()
         res = self.vm.cmd('human-monitor-command',