diff options
Diffstat (limited to 'tests/qemu-iotests/240')
-rwxr-xr-x | tests/qemu-iotests/240 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/qemu-iotests/240 b/tests/qemu-iotests/240 index ead7ee08eb..5d499c9a00 100755 --- a/tests/qemu-iotests/240 +++ b/tests/qemu-iotests/240 @@ -83,6 +83,24 @@ run_qemu <<EOF { "execute": "quit"} EOF +echo +echo === Attach two SCSI disks using the same block device and the same iothread === +echo + +run_qemu <<EOF +{ "execute": "qmp_capabilities" } +{ "execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true}} +{ "execute": "object-add", "arguments": {"qom-type": "iothread", "id": "iothread0"}} +{ "execute": "device_add", "arguments": {"id": "scsi0", "driver": "${virtio_scsi}", "iothread": "iothread0"}} +{ "execute": "device_add", "arguments": {"id": "scsi-hd0", "driver": "scsi-hd", "drive": "hd0"}} +{ "execute": "device_add", "arguments": {"id": "scsi-hd1", "driver": "scsi-hd", "drive": "hd0"}} +{ "execute": "device_del", "arguments": {"id": "scsi-hd0"}} +{ "execute": "device_del", "arguments": {"id": "scsi-hd1"}} +{ "execute": "device_del", "arguments": {"id": "scsi0"}} +{ "execute": "blockdev-del", "arguments": {"node-name": "hd0"}} +{ "execute": "quit"} +EOF + # success, all done echo "*** done" rm -f $seq.full |