[PATCH] tests/qtest: Don't run the dbus-display-test without CONFIG_VGA_PCI

Thomas Huth posted 1 patch 8 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240219123900.430943-1-thuth@redhat.com
Maintainers: Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tests/qtest: Don't run the dbus-display-test without CONFIG_VGA_PCI
Posted by Thomas Huth 8 months, 3 weeks ago
When compiling with "configure --without-default-devices", the
dbus-display-test fails since it implicitly assumes that the
machine comes with the standard VGA card. Thus add a check to
meson.build to disable the test if the VGA card is not available.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 2b89e8634b..c8e6d7df40 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -108,7 +108,7 @@ qtests_i386 = \
    'numa-test'
   ]
 
-if dbus_display
+if dbus_display and config_all_devices.has_key('CONFIG_VGA_PCI')
   qtests_i386 += ['dbus-display-test']
 endif
 
-- 
2.43.2
Re: [PATCH] tests/qtest: Don't run the dbus-display-test without CONFIG_VGA_PCI
Posted by Marc-André Lureau 8 months, 3 weeks ago
Hi

On Mon, Feb 19, 2024 at 4:39 PM Thomas Huth <thuth@redhat.com> wrote:
>
> When compiling with "configure --without-default-devices", the
> dbus-display-test fails since it implicitly assumes that the
> machine comes with the standard VGA card. Thus add a check to
> meson.build to disable the test if the VGA card is not available.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Not necessarily VGA, but a graphic or VC console. I am not sure how to
guess from the binary or compilation settings. Maybe it would be
simpler to check at run-time if /org/qemu/Display1/Console_0 exists. I
can work on a patch.

> ---
>  tests/qtest/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index 2b89e8634b..c8e6d7df40 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -108,7 +108,7 @@ qtests_i386 = \
>     'numa-test'
>    ]
>
> -if dbus_display
> +if dbus_display and config_all_devices.has_key('CONFIG_VGA_PCI')
>    qtests_i386 += ['dbus-display-test']
>  endif
>
> --
> 2.43.2
>
Re: [PATCH] tests/qtest: Don't run the dbus-display-test without CONFIG_VGA_PCI
Posted by Thomas Huth 8 months, 3 weeks ago
On 19/02/2024 15.00, Marc-André Lureau wrote:
> Hi
> 
> On Mon, Feb 19, 2024 at 4:39 PM Thomas Huth <thuth@redhat.com> wrote:
>>
>> When compiling with "configure --without-default-devices", the
>> dbus-display-test fails since it implicitly assumes that the
>> machine comes with the standard VGA card. Thus add a check to
>> meson.build to disable the test if the VGA card is not available.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
> 
> Not necessarily VGA, but a graphic or VC console.

Well, the test currently does not use any -device or -vga options, so it 
assumes that the default graphic card is around - which happens to be the 
VGA_PCI card for x86.

> I am not sure how to
> guess from the binary or compilation settings. Maybe it would be
> simpler to check at run-time if /org/qemu/Display1/Console_0 exists. I
> can work on a patch.

That sounds like a more robust solution indeed, so a patch would be very 
welcome!

  Thanks,
   Thomas


>> ---
>>   tests/qtest/meson.build | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
>> index 2b89e8634b..c8e6d7df40 100644
>> --- a/tests/qtest/meson.build
>> +++ b/tests/qtest/meson.build
>> @@ -108,7 +108,7 @@ qtests_i386 = \
>>      'numa-test'
>>     ]
>>
>> -if dbus_display
>> +if dbus_display and config_all_devices.has_key('CONFIG_VGA_PCI')
>>     qtests_i386 += ['dbus-display-test']
>>   endif
>>
>> --
>> 2.43.2
>>
>