2 * QTest testcase for vga cards
4 * Copyright (c) 2014 Red Hat, Inc
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
10 #include "qemu/osdep.h"
13 static void pci_multihead(void)
17 qts
= qtest_init("-vga none -device VGA -device secondary-vga");
21 static void test_vga(gconstpointer data
)
25 qts
= qtest_initf("-vga none -device %s", (const char *)data
);
29 int main(int argc
, char **argv
)
31 static const char *devices
[] = {
39 g_test_init(&argc
, &argv
, NULL
);
41 for (int i
= 0; i
< ARRAY_SIZE(devices
); i
++) {
42 if (qtest_has_device(devices
[i
])) {
43 char *testpath
= g_strdup_printf("/display/pci/%s", devices
[i
]);
44 qtest_add_data_func(testpath
, devices
[i
], test_vga
);
49 if (qtest_has_device("secondary-vga")) {
50 qtest_add_func("/display/pci/multihead", pci_multihead
);