aboutsummaryrefslogtreecommitdiff
path: root/tests/virtio-console-test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-10-18 16:20:28 +0200
committerCornelia Huck <cohuck@redhat.com>2017-10-20 13:32:10 +0200
commitd0a5cc5bf4cf8e4d7d14597dd57be526c3e9d76f (patch)
tree997498d5f8fa2b11ec9f15efe3e20592d55817e5 /tests/virtio-console-test.c
parent78b27bade1faf91435eae4bdcb7444dcf35f44bf (diff)
downloadqemu-d0a5cc5bf4cf8e4d7d14597dd57be526c3e9d76f.zip
qemu-d0a5cc5bf4cf8e4d7d14597dd57be526c3e9d76f.tar.gz
qemu-d0a5cc5bf4cf8e4d7d14597dd57be526c3e9d76f.tar.bz2
tests: Enable the very simple virtio tests on s390x, too
These tests can easily be used on s390x, too. We just have to make sure to use the virtio-xxx-ccw devices instead of virtio-xxx-pci. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1508336428-20511-3-git-send-email-thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'tests/virtio-console-test.c')
-rw-r--r--tests/virtio-console-test.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/virtio-console-test.c b/tests/virtio-console-test.c
index 1c3de07..945bae5 100644
--- a/tests/virtio-console-test.c
+++ b/tests/virtio-console-test.c
@@ -9,27 +9,30 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "libqos/virtio.h"
/* Tests only initialization so far. TODO: Replace with functional tests */
-static void console_pci_nop(void)
+static void console_nop(void)
{
- qtest_start("-device virtio-serial-pci,id=vser0 "
- "-device virtconsole,bus=vser0.0");
+ global_qtest = qtest_startf("-device virtio-serial-%s,id=vser0 "
+ "-device virtconsole,bus=vser0.0",
+ qvirtio_get_dev_type());
qtest_end();
}
-static void serialport_pci_nop(void)
+static void serialport_nop(void)
{
- qtest_start("-device virtio-serial-pci,id=vser0 "
- "-device virtserialport,bus=vser0.0");
+ global_qtest = qtest_startf("-device virtio-serial-%s,id=vser0 "
+ "-device virtserialport,bus=vser0.0",
+ qvirtio_get_dev_type());
qtest_end();
}
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
- qtest_add_func("/virtio/console/pci/nop", console_pci_nop);
- qtest_add_func("/virtio/serialport/pci/nop", serialport_pci_nop);
+ qtest_add_func("/virtio/console/nop", console_nop);
+ qtest_add_func("/virtio/serialport/nop", serialport_nop);
return g_test_run();
}