From: Maxim Levitsky <mlevitsk@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
qemu-block@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Maxim Levitsky" <mlevitsk@redhat.com>
Subject: [PATCH v2 1/2] iotests: add filter_qmp_virtio_scsi function
Date: Sun, 1 Nov 2020 18:15:31 +0200 [thread overview]
Message-ID: <20201101161532.259609-2-mlevitsk@redhat.com> (raw)
In-Reply-To: <20201101161532.259609-1-mlevitsk@redhat.com>
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>
---
tests/qemu-iotests/iotests.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 63d2ace93c..18b7437600 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)
--
2.26.2
next prev parent reply other threads:[~2020-11-01 16:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 16:15 [PATCH v2 0/2] Assorted fixes to tests that were broken by recent scsi changes Maxim Levitsky
2020-11-01 16:15 ` Maxim Levitsky [this message]
2020-11-01 16:15 ` [PATCH v2 2/2] iotests: rewrite iotest 240 in python Maxim Levitsky
2020-11-03 12:53 ` Max Reitz
2020-11-04 18:51 ` Maxim Levitsky
2020-11-02 8:33 ` [PATCH v2 0/2] Assorted fixes to tests that were broken by recent scsi changes Paolo Bonzini
2020-11-03 11:57 ` Christian Borntraeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201101161532.259609-2-mlevitsk@redhat.com \
--to=mlevitsk@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).