diff mbox

[8/9] virtio-gpu: add to display-vga test

Message ID 1426240033-24673-10-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann March 13, 2015, 9:47 a.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 tests/Makefile           |  3 +++
 tests/display-vga-test.c | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)

Comments

Paolo Bonzini March 16, 2015, 5:16 p.m. UTC | #1
On 13/03/2015 10:47, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  tests/Makefile           |  3 +++
>  tests/display-vga-test.c | 18 ++++++++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index 588f438..55ad89f 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -133,6 +133,9 @@ check-qtest-pci-y += tests/display-vga-test$(EXESUF)
>  gcov-files-pci-y += hw/display/vga.c
>  gcov-files-pci-y += hw/display/cirrus_vga.c
>  gcov-files-pci-y += hw/display/vga-pci.c
> +gcov-files-pci-y += hw/display/virtio-gpu.c
> +gcov-files-pci-y += hw/display/virtio-gpu-pci.c
> +gcov-files-pci-y += hw/display/virtio-vga.c
>  check-qtest-pci-y += tests/intel-hda-test$(EXESUF)
>  gcov-files-pci-y += hw/audio/intel-hda.c hw/audio/hda-codec.c
>  
> diff --git a/tests/display-vga-test.c b/tests/display-vga-test.c
> index 17f5910..cd0b873 100644
> --- a/tests/display-vga-test.c
> +++ b/tests/display-vga-test.c
> @@ -36,6 +36,20 @@ static void pci_multihead(void)
>      qtest_end();
>  }
>  
> +#ifdef CONFIG_VIRTIO_GPU
> +static void pci_virtio_gpu(void)
> +{
> +    qtest_start("-vga none -device virtio-gpu-pci");
> +    qtest_end();
> +}
> +
> +static void pci_virtio_vga(void)
> +{
> +    qtest_start("-vga none -device virtio-vga");
> +    qtest_end();
> +}
> +#endif
> +
>  int main(int argc, char **argv)
>  {
>      int ret;
> @@ -46,6 +60,10 @@ int main(int argc, char **argv)
>      qtest_add_func("/display/pci/stdvga", pci_stdvga);
>      qtest_add_func("/display/pci/secondary", pci_secondary);
>      qtest_add_func("/display/pci/multihead", pci_multihead);
> +#ifdef CONFIG_VIRTIO_GPU
> +    qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
> +    qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
> +#endif
>      ret = g_test_run();
>  
>      return ret;
> 

Which config file is defining this?

Paolo
Gerd Hoffmann March 17, 2015, 8:25 a.m. UTC | #2
Hi,

> > +#ifdef CONFIG_VIRTIO_GPU
> > +    qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
> > +    qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
> > +#endif
> >      ret = g_test_run();
> >  
> >      return ret;
> > 
> 
> Which config file is defining this?

Ahem, good point, CONFIG_VIRTIO_GPU used to be there but is gone now.
I'll fixup the test.

thanks,
  Gerd
diff mbox

Patch

diff --git a/tests/Makefile b/tests/Makefile
index 588f438..55ad89f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -133,6 +133,9 @@  check-qtest-pci-y += tests/display-vga-test$(EXESUF)
 gcov-files-pci-y += hw/display/vga.c
 gcov-files-pci-y += hw/display/cirrus_vga.c
 gcov-files-pci-y += hw/display/vga-pci.c
+gcov-files-pci-y += hw/display/virtio-gpu.c
+gcov-files-pci-y += hw/display/virtio-gpu-pci.c
+gcov-files-pci-y += hw/display/virtio-vga.c
 check-qtest-pci-y += tests/intel-hda-test$(EXESUF)
 gcov-files-pci-y += hw/audio/intel-hda.c hw/audio/hda-codec.c
 
diff --git a/tests/display-vga-test.c b/tests/display-vga-test.c
index 17f5910..cd0b873 100644
--- a/tests/display-vga-test.c
+++ b/tests/display-vga-test.c
@@ -36,6 +36,20 @@  static void pci_multihead(void)
     qtest_end();
 }
 
+#ifdef CONFIG_VIRTIO_GPU
+static void pci_virtio_gpu(void)
+{
+    qtest_start("-vga none -device virtio-gpu-pci");
+    qtest_end();
+}
+
+static void pci_virtio_vga(void)
+{
+    qtest_start("-vga none -device virtio-vga");
+    qtest_end();
+}
+#endif
+
 int main(int argc, char **argv)
 {
     int ret;
@@ -46,6 +60,10 @@  int main(int argc, char **argv)
     qtest_add_func("/display/pci/stdvga", pci_stdvga);
     qtest_add_func("/display/pci/secondary", pci_secondary);
     qtest_add_func("/display/pci/multihead", pci_multihead);
+#ifdef CONFIG_VIRTIO_GPU
+    qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
+    qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
+#endif
     ret = g_test_run();
 
     return ret;