@@ -62,6 +62,7 @@ check-qtest-sparc64-y = tests/m48t59-test$(EXESUF)
gcov-files-sparc-y += hw/m48t59.c
check-qtest-arm-y = tests/tmp105-test$(EXESUF)
qcov-files-arm-y += hw/tmp105.c
+check-qtest-s390x-y = tests/virtio-ccw-test$(EXESUF)
GENERATED_HEADERS += tests/test-qapi-types.h tests/test-qapi-visit.h tests/test-qmp-commands.h
@@ -111,6 +112,7 @@ tests/m48t59-test$(EXESUF): tests/m48t59-test.o
tests/fdc-test$(EXESUF): tests/fdc-test.o
tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/tmp105-test$(EXESUF): tests/tmp105-test.o
+tests/virtio-ccw-test$(EXESUF): tests/virtio-ccw-test.o
# QTest rules
new file mode 100644
@@ -0,0 +1,38 @@
+/*
+ * QTest testcase for virtio-ccw
+ *
+ * Copyright (c) 2013 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include "libqtest.h"
+
+#include <glib.h>
+
+#define KVM_S390_VIRTIO_RESET 1
+
+static void test(void)
+{
+ hypercall(KVM_S390_VIRTIO_RESET, 1, 128 * 1024 * 1024);
+}
+
+int main(int argc, char **argv)
+{
+ QTestState *s = NULL;
+ int ret;
+
+ g_test_init(&argc, &argv, NULL);
+
+ s = qtest_start("-display none -m 128M");
+
+ qtest_add_func("/virtio-ccw/dummy", test);
+
+ ret = g_test_run();
+
+ if (s) {
+ qtest_quit(s);
+ }
+
+ return ret;
+}
Signed-off-by: Andreas Färber <afaerber@suse.de> --- tests/Makefile | 2 ++ tests/virtio-ccw-test.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 Dateien geändert, 40 Zeilen hinzugefügt(+) create mode 100644 tests/virtio-ccw-test.c