From 208c38e4e4a5e808b5720329f3633f4ab2bc5026 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 12 Jul 2017 13:53:03 +0200 Subject: qemu-iotests: Test unplug of -device without drive 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 Reviewed-by: Eric Blake Reviewed-by: John Snow --- tests/qemu-iotests/067.out | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'tests/qemu-iotests/067.out') diff --git a/tests/qemu-iotests/067.out b/tests/qemu-iotests/067.out index e3c4496a9d..bd70557ddc 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 -- cgit v1.2.3