]> git.proxmox.com Git - mirror_qemu.git/blame - tests/virtio-console-test.c
spapr/target-ppc/kvm: Only add hcall-instructions if KVM supports it
[mirror_qemu.git] / tests / virtio-console-test.c
CommitLineData
6e8114a0
AF
1/*
2 * QTest testcase for VirtIO Console
3 *
4 * Copyright (c) 2014 SUSE LINUX Products GmbH
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
681c28a3 10#include "qemu/osdep.h"
6e8114a0 11#include <glib.h>
6e8114a0 12#include "libqtest.h"
6e8114a0
AF
13
14/* Tests only initialization so far. TODO: Replace with functional tests */
f33f9911 15static void console_pci_nop(void)
6e8114a0 16{
f33f9911
AF
17 qtest_start("-device virtio-serial-pci,id=vser0 "
18 "-device virtconsole,bus=vser0.0");
19 qtest_end();
20}
21
22static void serialport_pci_nop(void)
23{
24 qtest_start("-device virtio-serial-pci,id=vser0 "
25 "-device virtserialport,bus=vser0.0");
26 qtest_end();
6e8114a0
AF
27}
28
29int main(int argc, char **argv)
30{
31 int ret;
32
33 g_test_init(&argc, &argv, NULL);
f33f9911
AF
34 qtest_add_func("/virtio/console/pci/nop", console_pci_nop);
35 qtest_add_func("/virtio/serialport/pci/nop", serialport_pci_nop);
6e8114a0 36
6e8114a0
AF
37 ret = g_test_run();
38
6e8114a0
AF
39 return ret;
40}