From patchwork Wed Jun 27 08:26:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 167563 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4BA41B700E for ; Wed, 27 Jun 2012 18:26:22 +1000 (EST) Received: from localhost ([::1]:47522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjnZr-0007Ki-94 for incoming@patchwork.ozlabs.org; Wed, 27 Jun 2012 04:26:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjnZj-0007KZ-U3 for qemu-devel@nongnu.org; Wed, 27 Jun 2012 04:26:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjnZd-0005Ic-OV for qemu-devel@nongnu.org; Wed, 27 Jun 2012 04:26:11 -0400 Received: from oxygen.pond.sub.org ([78.46.104.156]:38234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjnZd-0005HS-IG for qemu-devel@nongnu.org; Wed, 27 Jun 2012 04:26:05 -0400 Received: from blackfin.pond.sub.org (p5B32A260.dip.t-dialin.net [91.50.162.96]) by oxygen.pond.sub.org (Postfix) with ESMTPA id EB26E9FE61; Wed, 27 Jun 2012 10:26:01 +0200 (CEST) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id 0E2B060099; Wed, 27 Jun 2012 10:26:01 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Wed, 27 Jun 2012 10:26:00 +0200 Message-Id: <1340785560-1201-2-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.7.6.5 In-Reply-To: <1340785560-1201-1-git-send-email-armbru@redhat.com> References: <1340785560-1201-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 78.46.104.156 Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [RFC PATCH 1/1] Stupid test case to demonstrate flawed crash handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- tests/Makefile | 2 ++ tests/crash-test.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 tests/crash-test.c diff --git a/tests/Makefile b/tests/Makefile index d66ab19..7fcf7a9 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -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 diff --git a/tests/crash-test.c b/tests/crash-test.c new file mode 100644 index 0000000..d69dae0 --- /dev/null +++ b/tests/crash-test.c @@ -0,0 +1,18 @@ +#include +#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; +}