diff mbox series

[v4,1/5] tests/qtests: override "force-legacy" for gpio virtio-mmio tests

Message ID 20221130112439.2527228-2-alex.bennee@linaro.org
State Superseded
Headers show
Series final vhost-user fixes | expand

Commit Message

Alex Bennée Nov. 30, 2022, 11:24 a.m. UTC
The GPIO device is a VIRTIO_F_VERSION_1 devices but running with a
legacy MMIO interface we miss out that feature bit causing confusion.
For the GPIO test force the mmio bus to support non-legacy so we can
properly test it.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1333
---
 tests/qtest/libqos/virtio-gpio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Huth Nov. 30, 2022, 12:15 p.m. UTC | #1
On 30/11/2022 12.24, Alex Bennée wrote:
> The GPIO device is a VIRTIO_F_VERSION_1 devices but running with a
> legacy MMIO interface we miss out that feature bit causing confusion.
> For the GPIO test force the mmio bus to support non-legacy so we can
> properly test it.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1333
> ---
>   tests/qtest/libqos/virtio-gpio.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/libqos/virtio-gpio.c b/tests/qtest/libqos/virtio-gpio.c
> index 762aa6695b..f22d7b5eb5 100644
> --- a/tests/qtest/libqos/virtio-gpio.c
> +++ b/tests/qtest/libqos/virtio-gpio.c
> @@ -154,7 +154,8 @@ static void virtio_gpio_register_nodes(void)
>       QOSGraphEdgeOptions edge_opts = { };
>   
>       /* vhost-user-gpio-device */
> -    edge_opts.extra_device_opts = "id=gpio0,chardev=chr-vhost-user-test";
> +    edge_opts.extra_device_opts = "id=gpio0,chardev=chr-vhost-user-test "
> +        "-global virtio-mmio.force-legacy=false";
>       qos_node_create_driver("vhost-user-gpio-device",
>                               virtio_gpio_device_create);
>       qos_node_consumes("vhost-user-gpio-device", "virtio-bus", &edge_opts);

Acked-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/tests/qtest/libqos/virtio-gpio.c b/tests/qtest/libqos/virtio-gpio.c
index 762aa6695b..f22d7b5eb5 100644
--- a/tests/qtest/libqos/virtio-gpio.c
+++ b/tests/qtest/libqos/virtio-gpio.c
@@ -154,7 +154,8 @@  static void virtio_gpio_register_nodes(void)
     QOSGraphEdgeOptions edge_opts = { };
 
     /* vhost-user-gpio-device */
-    edge_opts.extra_device_opts = "id=gpio0,chardev=chr-vhost-user-test";
+    edge_opts.extra_device_opts = "id=gpio0,chardev=chr-vhost-user-test "
+        "-global virtio-mmio.force-legacy=false";
     qos_node_create_driver("vhost-user-gpio-device",
                             virtio_gpio_device_create);
     qos_node_consumes("vhost-user-gpio-device", "virtio-bus", &edge_opts);