From patchwork Tue Mar 3 14:59:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 445751 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6497D14008F for ; Wed, 4 Mar 2015 02:00:04 +1100 (AEDT) Received: from localhost ([::1]:39120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSoIk-0008IH-OE for incoming@patchwork.ozlabs.org; Tue, 03 Mar 2015 10:00:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSoIL-0007Ww-LF for qemu-devel@nongnu.org; Tue, 03 Mar 2015 09:59:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSoII-0008U2-FO for qemu-devel@nongnu.org; Tue, 03 Mar 2015 09:59:37 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:41839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSoII-0008TO-5J for qemu-devel@nongnu.org; Tue, 03 Mar 2015 09:59:34 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Mar 2015 14:59:31 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 3 Mar 2015 14:59:29 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5B92B2190046 for ; Tue, 3 Mar 2015 14:59:21 +0000 (GMT) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t23ExT8o11796938 for ; Tue, 3 Mar 2015 14:59:29 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t23ExSl0012438 for ; Tue, 3 Mar 2015 07:59:28 -0700 Received: from oc1450873852.ibm.com (dyn-9-152-224-43.boeblingen.de.ibm.com [9.152.224.43]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t23ExS3c012408; Tue, 3 Mar 2015 07:59:28 -0700 From: Christian Borntraeger To: kwolf@redhat.com Date: Tue, 3 Mar 2015 15:59:26 +0100 Message-Id: <1425394766-12450-1-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 1.7.1 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15030314-0041-0000-0000-0000038F8E65 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.107 Cc: thuth@linux.vnet.ibm.com, Christian Borntraeger , qemu-devel@nongnu.org, tumanova@linux.vnet.ibm.com, armbru@redhat.com, mihajlov@linux.vnet.ibm.com, dahi@linux.vnet.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, mreitz@redhat.com Subject: [Qemu-devel] [PATCHv2] Add testcase for scsi-hd devices without drive property 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 Lets add a test for scsi devices without a drive. This was broken by a recent block patch, thus indicating that we need a testcase. Suggested-by: Kevin Wolf Signed-off-by: Christian Borntraeger Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/051 | 6 ++++++ tests/qemu-iotests/051.out | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 11c858f..6ab40e2 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -95,6 +95,12 @@ run_qemu -drive file="$TEST_IMG",driver=foo run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2 echo +echo === Device without drive === +echo + +run_qemu -device virtio-scsi-pci -device scsi-hd + +echo echo === Overriding backing file === echo diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index f497c57..e8e3258 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -44,6 +44,14 @@ Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2: could not open disk image TEST_DIR/t.qcow2: Driver specified twice +=== Device without drive === + +Testing: -device virtio-scsi-pci -device scsi-hd +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) QEMU_PROG: -device scsi-hd: drive property not set +QEMU_PROG: -device scsi-hd: Device 'scsi-hd' could not be initialized + + === Overriding backing file === Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig -nodefaults