[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 14/21] qemu-iotests: Test unplug of -device without d
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 14/21] qemu-iotests: Test unplug of -device without drive |
Date: |
Tue, 18 Jul 2017 16:17:59 +0200 |
This caused an assertion failure until recently because the BlockBackend
would be detached on unplug, but was in fact never attached in the first
place. Add a regression test.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
---
tests/qemu-iotests/067 | 13 +++++++++++++
tests/qemu-iotests/067.out | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+)
diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067
index 38d23fc..5d4ca4b 100755
--- a/tests/qemu-iotests/067
+++ b/tests/qemu-iotests/067
@@ -137,6 +137,19 @@ run_qemu <<EOF
{ "execute": "quit" }
EOF
+echo
+echo === Empty drive with -device and device_del ===
+echo
+
+run_qemu -device virtio-scsi-pci -device scsi-cd,id=cd0 <<EOF
+{ "execute": "qmp_capabilities" }
+{ "execute": "query-block" }
+{ "execute": "device_del", "arguments": { "id": "cd0" } }
+{ "execute": "system_reset" }
+{ "execute": "query-block" }
+{ "execute": "quit" }
+EOF
+
# success, all done
echo "*** done"
rm -f $seq.full
diff --git a/tests/qemu-iotests/067.out b/tests/qemu-iotests/067.out
index e3c4496..bd70557 100644
--- a/tests/qemu-iotests/067.out
+++ b/tests/qemu-iotests/067.out
@@ -416,4 +416,43 @@ Testing:
"return": {
}
}
+
+=== Empty drive with -device and device_del ===
+
+Testing: -device virtio-scsi-pci -device scsi-cd,id=cd0
+{
+ QMP_VERSION
+}
+{
+ "return": {
+ }
+}
+{
+ "return": [
+ {
+ "device": "",
+ "locked": false,
+ "removable": true,
+ "qdev": "cd0",
+ "tray_open": false,
+ "type": "unknown"
+ }
+ ]
+}
+{
+ "return": {
+ }
+}
+{
+ "return": {
+ }
+}
+{
+ "return": [
+ ]
+}
+{
+ "return": {
+ }
+}
*** done
--
1.8.3.1
- [Qemu-block] [PULL 04/21] block/vmdk: Report failures in vmdk_read_cid(), (continued)
- [Qemu-block] [PULL 04/21] block/vmdk: Report failures in vmdk_read_cid(), Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 03/21] block: remove timer canceling in throttle_config(), Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 05/21] block/vpc.c: Handle write failures in get_image_offset(), Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 06/21] block: Make blk_get_attached_dev_id() public, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 08/21] block: Make blk_all_next() public, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 09/21] block/qapi: Use blk_all_next() for query-block, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 07/21] block/qapi: Add qdev device name to query-block, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 10/21] block: List anonymous device BBs in query-block, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 11/21] ide: bdrv_attach_dev() for empty CD-ROM, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 12/21] scsi-disk: bdrv_attach_dev() for empty CD-ROM, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 14/21] qemu-iotests: Test unplug of -device without drive,
Kevin Wolf <=
- [Qemu-block] [PULL 16/21] vvfat: add a constant for bootsector name, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 13/21] qemu-iotests: Test 'info block', Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 17/21] vvfat: correctly parse non-ASCII short and long file names, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 15/21] vvfat: add constants for special values of name[0], Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 19/21] block/vvfat: Fix compiler warning with gcc 7, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 20/21] blockdev: move BDRV_O_NO_BACKING option forward, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 18/21] vvfat: initialize memory after allocating it, Kevin Wolf, 2017/07/18
- [Qemu-block] [PULL 21/21] qemu-img: Check for backing image if specified during create, Kevin Wolf, 2017/07/18
- Re: [Qemu-block] [Qemu-devel] [PULL 00/21] Block layer patches, no-reply, 2017/07/18