* [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS
@ 2024-12-02 20:40 Philippe Mathieu-Daudé
2024-12-02 20:40 ` [PATCH-for-9.2? 1/2] tests/functional/test_version: Use QTest accelerator Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-02 20:40 UTC (permalink / raw)
To: qemu-devel
Cc: Marcel Apfelbaum, Yanan Wang, Markus Armbruster, Eduardo Habkost,
Thomas Huth, Zhao Liu, Daniel P . Berrangé,
Philippe Mathieu-Daudé
Explicit the QTest accelerator to have these 2 tests
pass on macOS when only HVF is built in.
Philippe Mathieu-Daudé (2):
tests/functional/test_version: Use QTest accelerator
tests/functional/test_empty_cpu_model: Use QTest accelerator
tests/functional/test_empty_cpu_model.py | 2 +-
tests/functional/test_version.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH-for-9.2? 1/2] tests/functional/test_version: Use QTest accelerator
2024-12-02 20:40 [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Philippe Mathieu-Daudé
@ 2024-12-02 20:40 ` Philippe Mathieu-Daudé
2024-12-02 20:40 ` [PATCH-for-9.2? 2/2] tests/functional/test_empty_cpu_model: " Philippe Mathieu-Daudé
2024-12-02 20:56 ` [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Thomas Huth
2 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-02 20:40 UTC (permalink / raw)
To: qemu-devel
Cc: Marcel Apfelbaum, Yanan Wang, Markus Armbruster, Eduardo Habkost,
Thomas Huth, Zhao Liu, Daniel P . Berrangé,
Philippe Mathieu-Daudé
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 --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',
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH-for-9.2? 2/2] tests/functional/test_empty_cpu_model: Use QTest accelerator
2024-12-02 20:40 [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Philippe Mathieu-Daudé
2024-12-02 20:40 ` [PATCH-for-9.2? 1/2] tests/functional/test_version: Use QTest accelerator Philippe Mathieu-Daudé
@ 2024-12-02 20:40 ` Philippe Mathieu-Daudé
2024-12-02 20:56 ` [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Thomas Huth
2 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-02 20:40 UTC (permalink / raw)
To: qemu-devel
Cc: Marcel Apfelbaum, Yanan Wang, Markus Armbruster, Eduardo Habkost,
Thomas Huth, Zhao Liu, Daniel P . Berrangé,
Philippe Mathieu-Daudé
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 --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()
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS
2024-12-02 20:40 [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Philippe Mathieu-Daudé
2024-12-02 20:40 ` [PATCH-for-9.2? 1/2] tests/functional/test_version: Use QTest accelerator Philippe Mathieu-Daudé
2024-12-02 20:40 ` [PATCH-for-9.2? 2/2] tests/functional/test_empty_cpu_model: " Philippe Mathieu-Daudé
@ 2024-12-02 20:56 ` Thomas Huth
2024-12-02 21:01 ` Philippe Mathieu-Daudé
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2024-12-02 20:56 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Marcel Apfelbaum, Yanan Wang, Markus Armbruster, Eduardo Habkost,
Zhao Liu, Daniel P . Berrangé
On 02/12/2024 21.40, Philippe Mathieu-Daudé wrote:
> Explicit the QTest accelerator to have these 2 tests
> pass on macOS when only HVF is built in.
Could we maybe rather add something like this at the top of
tests/functional/meson.build :
if 'CONFIG_TCG' not in config_all and 'CONFIG_KVM' not in config_all
subdir_done()
endif
?
Thomas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS
2024-12-02 20:56 ` [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Thomas Huth
@ 2024-12-02 21:01 ` Philippe Mathieu-Daudé
2024-12-03 6:11 ` Thomas Huth
0 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-02 21:01 UTC (permalink / raw)
To: Thomas Huth, qemu-devel
Cc: Marcel Apfelbaum, Yanan Wang, Markus Armbruster, Eduardo Habkost,
Zhao Liu, Daniel P . Berrangé
On 2/12/24 21:56, Thomas Huth wrote:
> On 02/12/2024 21.40, Philippe Mathieu-Daudé wrote:
>> Explicit the QTest accelerator to have these 2 tests
>> pass on macOS when only HVF is built in.
>
> Could we maybe rather add something like this at the top of tests/
> functional/meson.build :
>
> if 'CONFIG_TCG' not in config_all and 'CONFIG_KVM' not in config_all
> subdir_done()
> endif
I'd rather not:
- these tests don't need anything of TCG/KVM/HVF
- we can run functional tests using QTest [*]
[*] I'm actually using that to test my qemu-system-any
binary which has HW models but no vCPU nor accelerator
right now (except QTest).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS
2024-12-02 21:01 ` Philippe Mathieu-Daudé
@ 2024-12-03 6:11 ` Thomas Huth
2024-12-03 8:34 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2024-12-03 6:11 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Marcel Apfelbaum, Yanan Wang, Markus Armbruster, Eduardo Habkost,
Zhao Liu, Daniel P . Berrangé
On 02/12/2024 22.01, Philippe Mathieu-Daudé wrote:
> On 2/12/24 21:56, Thomas Huth wrote:
>> On 02/12/2024 21.40, Philippe Mathieu-Daudé wrote:
>>> Explicit the QTest accelerator to have these 2 tests
>>> pass on macOS when only HVF is built in.
>>
>> Could we maybe rather add something like this at the top of tests/
>> functional/meson.build :
>>
>> if 'CONFIG_TCG' not in config_all and 'CONFIG_KVM' not in config_all
>> subdir_done()
>> endif
>
> I'd rather not:
> - these tests don't need anything of TCG/KVM/HVF
> - we can run functional tests using QTest [*]
Ok, but then please switch to "-accel qtest" instead of "-machine
...,accel=qtest" since the latter is legacy and might go away sometime in
the future.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS
2024-12-03 6:11 ` Thomas Huth
@ 2024-12-03 8:34 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-03 8:34 UTC (permalink / raw)
To: Thomas Huth, qemu-devel
Cc: Marcel Apfelbaum, Yanan Wang, Markus Armbruster, Eduardo Habkost,
Zhao Liu, Daniel P . Berrangé
On 3/12/24 07:11, Thomas Huth wrote:
> On 02/12/2024 22.01, Philippe Mathieu-Daudé wrote:
>> On 2/12/24 21:56, Thomas Huth wrote:
>>> On 02/12/2024 21.40, Philippe Mathieu-Daudé wrote:
>>>> Explicit the QTest accelerator to have these 2 tests
>>>> pass on macOS when only HVF is built in.
>>>
>>> Could we maybe rather add something like this at the top of tests/
>>> functional/meson.build :
>>>
>>> if 'CONFIG_TCG' not in config_all and 'CONFIG_KVM' not in config_all
>>> subdir_done()
>>> endif
>>
>> I'd rather not:
>> - these tests don't need anything of TCG/KVM/HVF
>> - we can run functional tests using QTest [*]
>
> Ok, but then please switch to "-accel qtest" instead of "-
> machine ...,accel=qtest" since the latter is legacy and might go away
> sometime in the future.
Doh I thought it was the opposite :/ Sure!
>
> Thanks,
> Thomas
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-03 8:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 20:40 [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Philippe Mathieu-Daudé
2024-12-02 20:40 ` [PATCH-for-9.2? 1/2] tests/functional/test_version: Use QTest accelerator Philippe Mathieu-Daudé
2024-12-02 20:40 ` [PATCH-for-9.2? 2/2] tests/functional/test_empty_cpu_model: " Philippe Mathieu-Daudé
2024-12-02 20:56 ` [PATCH-for-9.2? 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Thomas Huth
2024-12-02 21:01 ` Philippe Mathieu-Daudé
2024-12-03 6:11 ` Thomas Huth
2024-12-03 8:34 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.