aboutsummaryrefslogtreecommitdiff
path: root/tests/display-vga-test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2018-11-29 12:50:48 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-01-11 11:45:00 +0100
commitc2077ec2d98f3914b850212f00ca5456b6e4774d (patch)
tree3b2f7beadece9786f0d7f95fd677a73ed30df0d0 /tests/display-vga-test.c
parenta311f891abf3833c1e4c5a62a6e5b0f1b81f22c3 (diff)
downloadqemu-c2077ec2d98f3914b850212f00ca5456b6e4774d.zip
qemu-c2077ec2d98f3914b850212f00ca5456b6e4774d.tar.gz
qemu-c2077ec2d98f3914b850212f00ca5456b6e4774d.tar.bz2
tests/display-vga: Enable virtio-vga test
There are some "#ifdef CONFIG_VIRTIO_VGA" in the code here which do not work as expected: CONFIG_VIRTIO_VGA is a Makefile switch, but not a CPP macro, so the "guarded" code currently simply never gets enabled. So enable this code now unconditionally, with some runtime switches for the architectures that have the VIRTIO_VGA device enabled by default. Looking at the other if-statement in the main function here, it also seems like this test was originally supposed to be running on "mips" and "alpha", too, so enable it now for these architectures in the Makefile, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1543492248-28356-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'tests/display-vga-test.c')
-rw-r--r--tests/display-vga-test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/display-vga-test.c b/tests/display-vga-test.c
index 2d7d24e..bd176dc 100644
--- a/tests/display-vga-test.c
+++ b/tests/display-vga-test.c
@@ -40,13 +40,11 @@ static void pci_virtio_gpu(void)
qtest_end();
}
-#ifdef CONFIG_VIRTIO_VGA
static void pci_virtio_vga(void)
{
qtest_start("-vga none -device virtio-vga");
qtest_end();
}
-#endif
int main(int argc, char **argv)
{
@@ -62,8 +60,10 @@ int main(int argc, char **argv)
qtest_add_func("/display/pci/secondary", pci_secondary);
qtest_add_func("/display/pci/multihead", pci_multihead);
qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
-#ifdef CONFIG_VIRTIO_VGA
- qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
-#endif
+ if (g_str_equal(arch, "i386") || g_str_equal(arch, "x86_64") ||
+ g_str_equal(arch, "hppa") || g_str_equal(arch, "ppc64")) {
+ qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
+ }
+
return g_test_run();
}