X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=tests%2Fqemu-iotests%2F051;h=200660f9773b7d4c56b217a6c3f52dbbf281a3a5;hb=6ec889eb85c8fe96827c57e3900d8a1079554f3d;hp=6a3b7c2b89edc0616bac358118a2f2bf347f5cb8;hpb=1fa87eb56ea0af5a8133b9e11101732f5df7d46f;p=mirror_qemu.git diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 6a3b7c2b89..200660f977 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -38,7 +38,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file -_supported_os Linux # A compat=0.10 image is created in this test which does not support anything # other than refcount_bits=16 _unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' @@ -192,6 +191,30 @@ case "$QEMU_DEFAULT_MACHINE" in ;; esac +echo +echo === Attach to node in non-default iothread === +echo + +case "$QEMU_DEFAULT_MACHINE" in + pc) + iothread="-drive file=$TEST_IMG,if=none,node-name=disk -object iothread,id=thread0 -device virtio-scsi,iothread=thread0,id=virtio-scsi0 -device scsi-hd,bus=virtio-scsi0.0,drive=disk,share-rw=on" + + # Can't add a device in the main thread while virtio-scsi0 uses the node + run_qemu $iothread -device ide-hd,drive=disk,share-rw=on + run_qemu $iothread -device virtio-blk-pci,drive=disk,share-rw=on + run_qemu $iothread -device lsi53c895a,id=lsi0 -device scsi-hd,bus=lsi0.0,drive=disk,share-rw=on + run_qemu $iothread -device virtio-scsi,id=virtio-scsi1 -device scsi-hd,bus=virtio-scsi1.0,drive=disk,share-rw=on + + # virtio-blk enables the iothread only when the driver initialises the + # device, so a second virtio-blk device can't be added even with the + # same iothread. virtio-scsi allows this. + run_qemu $iothread -device virtio-blk-pci,drive=disk,iohtread=iothread0,share-rw=on + run_qemu $iothread -device virtio-scsi,id=virtio-scsi1,iothread=thread0 -device scsi-hd,bus=virtio-scsi1.0,drive=disk,share-rw=on + ;; + *) + ;; +esac + echo echo === Read-only === echo @@ -360,7 +383,7 @@ TMPDIR=/nonexistent run_qemu -drive driver=null-co,snapshot=on echo "info block" | run_qemu -drive file="$TEST_IMG",snapshot=on,read-only=on,if=none,id=$device_id | _filter_qemu_io | - sed -e 's#"/[^"]*/vl\.[A-Za-z0-9]\{6\}"#SNAPSHOT_PATH#g' + sed -e 's#"[^"]*/vl\.[A-Za-z0-9]\{6\}"#SNAPSHOT_PATH#g' # success, all done