@@ -20,6 +20,7 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
# All QTests for now are POSIX-only, but the dependencies are
# really in libqtest, not in the testcases themselves.
check-qtest-i386-y = tests/fdc-test$(EXESUF)
+check-qtest-i386-y = tests/crash-test$(EXESUF)
check-qtest-i386-y += tests/rtc-test$(EXESUF)
check-qtest-x86_64-y = $(check-qtest-i386-y)
check-qtest-sparc-y = tests/m48t59-test$(EXESUF)
@@ -70,6 +71,7 @@ tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(
tests/rtc-test$(EXESUF): tests/rtc-test.o $(trace-obj-y)
tests/m48t59-test$(EXESUF): tests/m48t59-test.o $(trace-obj-y)
tests/fdc-test$(EXESUF): tests/fdc-test.o tests/libqtest.o $(trace-obj-y)
+tests/crash-test$(EXESUF): tests/crash-test.o tests/libqtest.o $(trace-obj-y)
# QTest rules
new file mode 100644
@@ -0,0 +1,18 @@
+#include <glib.h>
+#include "libqtest.h"
+
+int main(int argc, char **argv)
+{
+ int ret;
+
+ g_test_init(&argc, &argv, NULL);
+
+ qtest_start("-display none -drive if=ide");
+ qtest_irq_intercept_in(global_qtest, "ioapic");
+
+ ret = g_test_run();
+
+ qtest_quit(global_qtest);
+
+ return ret;
+}
Makes "make check" hang: QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test TEST: tests/crash-test... (pid=972) qemu-system-x86_64: Device needs media, but drive is empty [Nothing happens, wait a while, then hit ^C] make: *** [check-qtest-x86_64] Interrupt Relies on the bug in "-drive if=ide" error handling I just reported[*], because I'm lazy. [*] Subject: Regression commit 6e008585 qdev: remove info from class Signed-off-by: Markus Armbruster <armbru@redhat.com> --- tests/Makefile | 2 ++ tests/crash-test.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 tests/crash-test.c