mbox series

[PATCH-for-9.2?,0/2] tests/functional: Fix tests failing when TCG is not available on macOS

Message ID 20241202204020.55665-1-philmd@linaro.org (mailing list archive)
Headers show
Series tests/functional: Fix tests failing when TCG is not available on macOS | expand

Message

Philippe Mathieu-Daudé Dec. 2, 2024, 8:40 p.m. UTC
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(-)

Comments

Thomas Huth Dec. 2, 2024, 8:56 p.m. UTC | #1
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
Philippe Mathieu-Daudé Dec. 2, 2024, 9:01 p.m. UTC | #2
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).
Thomas Huth Dec. 3, 2024, 6:11 a.m. UTC | #3
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
Philippe Mathieu-Daudé Dec. 3, 2024, 8:34 a.m. UTC | #4
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
>