]> git.proxmox.com Git - mirror_qemu.git/blame - tests/display-vga-test.c
block: Set BDRV_O_INCOMING in bdrv_fill_options()
[mirror_qemu.git] / tests / display-vga-test.c
CommitLineData
0850fd58
GH
1/*
2 * QTest testcase for vga cards
3 *
4 * Copyright (c) 2014 Red Hat, Inc
5 *
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.
8 */
9
10#include <glib.h>
11#include <string.h>
12#include "libqtest.h"
13#include "qemu/osdep.h"
14
15static void pci_cirrus(void)
16{
17 qtest_start("-vga none -device cirrus-vga");
18 qtest_end();
19}
20
21static void pci_stdvga(void)
22{
23 qtest_start("-vga none -device VGA");
24 qtest_end();
25}
26
a889bc2b
GH
27static void pci_secondary(void)
28{
29 qtest_start("-vga none -device secondary-vga");
30 qtest_end();
31}
32
33static void pci_multihead(void)
34{
35 qtest_start("-vga none -device VGA -device secondary-vga");
36 qtest_end();
37}
38
501eea4f
GH
39static void pci_virtio_gpu(void)
40{
41 qtest_start("-vga none -device virtio-gpu-pci");
42 qtest_end();
43}
44
45#ifdef CONFIG_VIRTIO_VGA
46static void pci_virtio_vga(void)
47{
48 qtest_start("-vga none -device virtio-vga");
49 qtest_end();
50}
51#endif
52
0850fd58
GH
53int main(int argc, char **argv)
54{
55 int ret;
56
57 g_test_init(&argc, &argv, NULL);
58
59 qtest_add_func("/display/pci/cirrus", pci_cirrus);
60 qtest_add_func("/display/pci/stdvga", pci_stdvga);
a889bc2b
GH
61 qtest_add_func("/display/pci/secondary", pci_secondary);
62 qtest_add_func("/display/pci/multihead", pci_multihead);
501eea4f
GH
63 qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
64#ifdef CONFIG_VIRTIO_VGA
65 qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
66#endif
0850fd58
GH
67 ret = g_test_run();
68
69 return ret;
70}