From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUzp4-0006hQ-LO for qemu-devel@nongnu.org; Mon, 09 Mar 2015 11:42:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUzoy-00027R-Et for qemu-devel@nongnu.org; Mon, 09 Mar 2015 11:42:26 -0400 From: Kevin Wolf Date: Mon, 9 Mar 2015 16:41:53 +0100 Message-Id: <1425915718-25138-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1425915718-25138-1-git-send-email-kwolf@redhat.com> References: <1425915718-25138-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 68/73] Add testcase for scsi-hd devices without drive property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Christian Borntraeger 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: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/051 | 6 ++++++ tests/qemu-iotests/051.out | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 2274d18..0360f37 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -99,6 +99,12 @@ run_qemu -drive file="$TEST_IMG",driver=raw,format=qcow2 run_qemu -drive file="$TEST_IMG",driver=qcow2,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 88add8f..09895e6 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -47,6 +47,14 @@ Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: Cannot specify both 'driver' and 'format' +=== 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 -- 1.8.3.1