diff options
author | Maxim Levitsky <mlevitsk@redhat.com> | 2020-11-04 20:50:25 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-11-09 15:44:21 +0100 |
commit | c6ac463631a124eaa47cae8a9a4aaac4d0761d28 (patch) | |
tree | a7b8937e875dd966a17c01a352c02173e6377d29 /tests/qemu-iotests/240.out | |
parent | 2daba442059a838f8f3c80d8fa52a85768ba7c4c (diff) | |
download | qemu-c6ac463631a124eaa47cae8a9a4aaac4d0761d28.zip qemu-c6ac463631a124eaa47cae8a9a4aaac4d0761d28.tar.gz qemu-c6ac463631a124eaa47cae8a9a4aaac4d0761d28.tar.bz2 |
iotests: rewrite iotest 240 in python
The recent changes that brought RCU delayed device deletion,
broke few tests and this test breakage went unnoticed.
Fix this test by rewriting it in python
(which allows to wait for DEVICE_DELETED events before continuing).
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201104185025.434703-3-mlevitsk@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/240.out')
-rw-r--r-- | tests/qemu-iotests/240.out | 76 |
1 files changed, 42 insertions, 34 deletions
diff --git a/tests/qemu-iotests/240.out b/tests/qemu-iotests/240.out index d00df50..e098283 100644 --- a/tests/qemu-iotests/240.out +++ b/tests/qemu-iotests/240.out @@ -1,67 +1,75 @@ -QA output created by 240 - -=== Unplug a SCSI disk and then plug it again === - -Testing: -QMP_VERSION -{"return": {}} +==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": {}} - -=== Attach two SCSI disks using the same block device and the same iothread === - -Testing: -QMP_VERSION -{"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": {}} - -=== Attach two SCSI disks using the same block device but different iothreads === - -Testing: -QMP_VERSION -{"return": {}} -{"return": {}} -{"return": {}} -{"return": {}} -{"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"}} {"error": {"class": "GenericError", "desc": "Cannot change iothread of active block backend"}} +{"execute": "device_del", "arguments": {"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-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": {}} - -=== Attach a SCSI disks using the same block device as a NBD server === - -Testing: -QMP_VERSION -{"return": {}} -{"return": {}} -{"return": {}} -{"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": {}} -{"return": {}} -*** done +.... +---------------------------------------------------------------------- +Ran 4 tests + +OK |