mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 00:07:57 -06:00

Commit2e8e18c2e4
("virtio-scsi: add iothread-vq-mapping parameter") removed the limitation that virtio-scsi devices must successfully set the AioContext on their BlockBackends. This was made possible thanks to the QEMU multi-queue block layer. This change broke qemu-iotests 240, which checks that adding a virtio-scsi device with a drive that is already in another AioContext will fail. Update the test to take the relaxed behavior into account. I considered removing this test case entirely, but the code coverage still seems valuable. Fixes:2e8e18c2e4
("virtio-scsi: add iothread-vq-mapping parameter") Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Message-ID: <20250529203147.180338-1-stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
73 lines
3.6 KiB
Text
73 lines
3.6 KiB
Text
==Unplug a SCSI disk and then plug it again==
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-zeroes": true}}
|
|
{"return": {}}
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "blockdev-del", "arguments": {"node-name": "hd0"}}
|
|
{"return": {}}
|
|
.==Attach two SCSI disks using the same block device and the same iothread==
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true, "read-zeroes": true}}
|
|
{"return": {}}
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd1"}}
|
|
{"return": {}}
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd1"}}
|
|
{"return": {}}
|
|
{"execute": "blockdev-del", "arguments": {"node-name": "hd0"}}
|
|
{"return": {}}
|
|
.==Attach two SCSI disks using the same block device but different iothreads==
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true, "read-zeroes": true}}
|
|
{"return": {}}
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
|
{"return": {}}
|
|
{"execute": "object-add", "arguments": {"id": "iothread1", "qom-type": "iothread"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi1", "iothread": "iothread1"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"bus": "scsi0.0", "drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"bus": "scsi1.0", "drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd1"}}
|
|
{"return": {}}
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
{"execute": "device_del", "arguments": {"id": "scsi-hd1"}}
|
|
{"return": {}}
|
|
{"execute": "blockdev-del", "arguments": {"node-name": "hd0"}}
|
|
{"return": {}}
|
|
.==Attach a SCSI disks using the same block device as a NBD server==
|
|
{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true, "read-zeroes": true}}
|
|
{"return": {}}
|
|
{"execute": "nbd-server-start", "arguments": {"addr": {"data": {"path": "SOCK_DIR/PID-nbd.sock"}, "type": "unix"}}}
|
|
{"return": {}}
|
|
{"execute": "nbd-server-add", "arguments": {"device": "hd0"}}
|
|
{"return": {}}
|
|
{"execute": "object-add", "arguments": {"id": "iothread0", "qom-type": "iothread"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"driver": "virtio-scsi", "id": "scsi0", "iothread": "iothread0"}}
|
|
{"return": {}}
|
|
{"execute": "device_add", "arguments": {"drive": "hd0", "driver": "scsi-hd", "id": "scsi-hd0"}}
|
|
{"return": {}}
|
|
.
|
|
----------------------------------------------------------------------
|
|
Ran 4 tests
|
|
|
|
OK
|