diff options
author | Maxim Levitsky <mlevitsk@redhat.com> | 2020-11-04 20:50:24 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-11-09 15:44:21 +0100 |
commit | 2daba442059a838f8f3c80d8fa52a85768ba7c4c (patch) | |
tree | fed738a7de9d996d8687bdff8053f2eeb6cec179 | |
parent | 73ad0ff216d2e1cf08909a0597e7b072babfe9c4 (diff) | |
download | qemu-2daba442059a838f8f3c80d8fa52a85768ba7c4c.zip qemu-2daba442059a838f8f3c80d8fa52a85768ba7c4c.tar.gz qemu-2daba442059a838f8f3c80d8fa52a85768ba7c4c.tar.bz2 |
iotests: add filter_qmp_virtio_scsi function
filter_qmp_virtio_scsi can be used to filter virtio-scsi-pci/ccw differences.
Note that this patch was only tested on x86.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
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-2-mlevitsk@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
-rw-r--r-- | tests/qemu-iotests/iotests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 814804a..bcd4fe5 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -392,6 +392,16 @@ def filter_qmp_testfiles(qmsg): return value return filter_qmp(qmsg, _filter) +def filter_virtio_scsi(output: str) -> str: + return re.sub(r'(virtio-scsi)-(ccw|pci)', r'\1', output) + +def filter_qmp_virtio_scsi(qmsg): + def _filter(_key, value): + if is_str(value): + return filter_virtio_scsi(value) + return value + return filter_qmp(qmsg, _filter) + def filter_generated_node_ids(msg): return re.sub("#block[0-9]+", "NODE_NAME", msg) |