[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 44/46] tests: Enable the very simple virtio tests on
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 44/46] tests: Enable the very simple virtio tests on s390x, too |
Date: |
Fri, 20 Oct 2017 13:54:16 +0200 |
From: Thomas Huth <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
tests/Makefile.include | 9 ++++++---
tests/virtio-balloon-test.c | 8 +++++---
tests/virtio-console-test.c | 19 +++++++++++--------
tests/virtio-serial-test.c | 10 ++++++----
4 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 4ca15e6817..70dc711bca 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -367,6 +367,9 @@ check-qtest-s390x-$(CONFIG_SLIRP) +=
tests/test-netfilter$(EXESUF)
check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF)
check-qtest-s390x-y += tests/drive_del-test$(EXESUF)
+check-qtest-s390x-y += tests/virtio-balloon-test$(EXESUF)
+check-qtest-s390x-y += tests/virtio-console-test$(EXESUF)
+check-qtest-s390x-y += tests/virtio-serial-test$(EXESUF)
check-qtest-generic-y += tests/qom-test$(EXESUF)
check-qtest-generic-y += tests/test-hmp$(EXESUF)
@@ -754,14 +757,14 @@ tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
tests/ne2000-test$(EXESUF): tests/ne2000-test.o
tests/wdt_ib700-test$(EXESUF): tests/wdt_ib700-test.o
tests/tco-test$(EXESUF): tests/tco-test.o $(libqos-pc-obj-y)
-tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o
+tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o
$(libqos-virtio-obj-y)
tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o $(libqos-virtio-obj-y)
tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o $(libqos-pc-obj-y)
$(libqos-virtio-obj-y)
tests/virtio-rng-test$(EXESUF): tests/virtio-rng-test.o $(libqos-pc-obj-y)
tests/virtio-scsi-test$(EXESUF): tests/virtio-scsi-test.o
$(libqos-virtio-obj-y)
tests/virtio-9p-test$(EXESUF): tests/virtio-9p-test.o $(libqos-virtio-obj-y)
-tests/virtio-serial-test$(EXESUF): tests/virtio-serial-test.o
-tests/virtio-console-test$(EXESUF): tests/virtio-console-test.o
+tests/virtio-serial-test$(EXESUF): tests/virtio-serial-test.o
$(libqos-virtio-obj-y)
+tests/virtio-console-test$(EXESUF): tests/virtio-console-test.o
$(libqos-virtio-obj-y)
tests/tpci200-test$(EXESUF): tests/tpci200-test.o
tests/display-vga-test$(EXESUF): tests/display-vga-test.o
tests/ipoctal232-test$(EXESUF): tests/ipoctal232-test.o
diff --git a/tests/virtio-balloon-test.c b/tests/virtio-balloon-test.c
index 0d0046bf25..0a07e036bb 100644
--- a/tests/virtio-balloon-test.c
+++ b/tests/virtio-balloon-test.c
@@ -9,9 +9,10 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "libqos/virtio.h"
/* Tests only initialization so far. TODO: Replace with functional tests */
-static void pci_nop(void)
+static void balloon_nop(void)
{
}
@@ -20,9 +21,10 @@ int main(int argc, char **argv)
int ret;
g_test_init(&argc, &argv, NULL);
- qtest_add_func("/virtio/balloon/pci/nop", pci_nop);
+ qtest_add_func("/virtio/balloon/nop", balloon_nop);
- qtest_start("-device virtio-balloon-pci");
+ global_qtest = qtest_startf("-device virtio-balloon-%s",
+ qvirtio_get_dev_type());
ret = g_test_run();
qtest_end();
diff --git a/tests/virtio-console-test.c b/tests/virtio-console-test.c
index 1c3de072f4..945bae5a15 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();
}
diff --git a/tests/virtio-serial-test.c b/tests/virtio-serial-test.c
index 7d1517dee3..7cc7060264 100644
--- a/tests/virtio-serial-test.c
+++ b/tests/virtio-serial-test.c
@@ -9,9 +9,10 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "libqos/virtio.h"
/* Tests only initialization so far. TODO: Replace with functional tests */
-static void pci_nop(void)
+static void virtio_serial_nop(void)
{
}
@@ -27,10 +28,11 @@ int main(int argc, char **argv)
int ret;
g_test_init(&argc, &argv, NULL);
- qtest_add_func("/virtio/serial/pci/nop", pci_nop);
- qtest_add_func("/virtio/serial/pci/hotplug", hotplug);
+ qtest_add_func("/virtio/serial/nop", virtio_serial_nop);
+ qtest_add_func("/virtio/serial/hotplug", hotplug);
- qtest_start("-device virtio-serial-pci");
+ global_qtest = qtest_startf("-device virtio-serial-%s",
+ qvirtio_get_dev_type());
ret = g_test_run();
qtest_end();
--
2.13.6
- [qemu-s390x] [PULL 33/46] s390x/MAINTAINERS: add mailing list, (continued)
- [qemu-s390x] [PULL 33/46] s390x/MAINTAINERS: add mailing list, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 34/46] s390x/event-facility: variable-length event masks, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 35/46] s390x: fix cpu object referrence leak in s390x_new_cpu(), Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 36/46] s390x: move s390x_new_cpu() into board code, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 37/46] s390x/css: IO instr handler ending control, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 39/46] s390x: refactor error handling for XSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 38/46] s390x: improve error handling for SSCH and RSCH, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 40/46] s390x: refactor error handling for CSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 41/46] s390x: refactor error handling for HSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 42/46] s390x: refactor error handling for MSCH handler, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 44/46] tests: Enable the very simple virtio tests on s390x, too,
Cornelia Huck <=
- [qemu-s390x] [PULL 43/46] libqtest: Add qtest_[v]startf(), Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 45/46] accel/tcg: allow to invalidate a write TLB entry immediately, Cornelia Huck, 2017/10/20
- [qemu-s390x] [PULL 46/46] s390x/tcg: low-address protection support, Cornelia Huck, 2017/10/20
- Re: [qemu-s390x] [PULL 00/46] more s390x patches for 2.11, Peter Maydell, 2017/10/20