[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 9/9] qemu-iotests: Test unplug of -device without dr
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 9/9] qemu-iotests: Test unplug of -device without drive |
Date: |
Wed, 12 Jul 2017 14:57:29 +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>
---
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-devel] [PATCH 4/9] block/qapi: Use blk_all_next() for query-block, (continued)
- [Qemu-devel] [PATCH 4/9] block/qapi: Use blk_all_next() for query-block, Kevin Wolf, 2017/07/12
- [Qemu-devel] [PATCH 5/9] block: List anonymous device BBs in query-block, Kevin Wolf, 2017/07/12
- [Qemu-devel] [PATCH 7/9] scsi-disk: bdrv_attach_dev() for empty CD-ROM, Kevin Wolf, 2017/07/12
- [Qemu-devel] [PATCH 6/9] ide: bdrv_attach_dev() for empty CD-ROM, Kevin Wolf, 2017/07/12
- [Qemu-devel] [PATCH 8/9] qemu-iotests: Test 'info block', Kevin Wolf, 2017/07/12
- [Qemu-devel] [PATCH 9/9] qemu-iotests: Test unplug of -device without drive,
Kevin Wolf <=