[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 62/71] iotests: Fix 207 to use QMP filters for qmp_lo
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 62/71] iotests: Fix 207 to use QMP filters for qmp_log |
Date: |
Mon, 25 Feb 2019 16:20:44 +0100 |
From: Max Reitz <address@hidden>
Fixes: 08fcd6111e1949f456e1b232ebeeb0cc17019a92
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: John Snow <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/207 | 10 +++++++---
tests/qemu-iotests/207.out | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/207 b/tests/qemu-iotests/207
index c617ee7453..dfd3c51bd1 100755
--- a/tests/qemu-iotests/207
+++ b/tests/qemu-iotests/207
@@ -27,12 +27,16 @@ import re
iotests.verify_image_format(supported_fmts=['raw'])
iotests.verify_protocol(supported=['ssh'])
-def filter_hash(msg):
- return re.sub('"hash": "[0-9a-f]+"', '"hash": HASH', msg)
+def filter_hash(qmsg):
+ def _filter(key, value):
+ if key == 'hash' and re.match('[0-9a-f]+', value):
+ return 'HASH'
+ return value
+ return iotests.filter_qmp(qmsg, _filter)
def blockdev_create(vm, options):
result = vm.qmp_log('blockdev-create', job_id='job0', options=options,
- filters=[iotests.filter_testfiles, filter_hash])
+ filters=[iotests.filter_qmp_testfiles, filter_hash])
if 'return' in result:
assert result['return'] == {}
diff --git a/tests/qemu-iotests/207.out b/tests/qemu-iotests/207.out
index 45ac7c2a8f..88d2240f54 100644
--- a/tests/qemu-iotests/207.out
+++ b/tests/qemu-iotests/207.out
@@ -40,7 +40,7 @@ Job failed: remote host key does not match host_key_check
'wrong'
{"execute": "job-dismiss", "arguments": {"id": "job0"}}
{"return": {}}
-{"execute": "blockdev-create", "arguments": {"job_id": "job0", "options":
{"driver": "ssh", "location": {"host-key-check": {"hash": HASH, "mode": "hash",
"type": "md5"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1",
"port": "22"}}, "size": 8388608}}}
+{"execute": "blockdev-create", "arguments": {"job_id": "job0", "options":
{"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode":
"hash", "type": "md5"}, "path": "TEST_DIR/PID-t.img", "server": {"host":
"127.0.0.1", "port": "22"}}, "size": 8388608}}}
{"return": {}}
{"execute": "job-dismiss", "arguments": {"id": "job0"}}
{"return": {}}
@@ -55,7 +55,7 @@ Job failed: remote host key does not match host_key_check
'wrong'
{"execute": "job-dismiss", "arguments": {"id": "job0"}}
{"return": {}}
-{"execute": "blockdev-create", "arguments": {"job_id": "job0", "options":
{"driver": "ssh", "location": {"host-key-check": {"hash": HASH, "mode": "hash",
"type": "sha1"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1",
"port": "22"}}, "size": 4194304}}}
+{"execute": "blockdev-create", "arguments": {"job_id": "job0", "options":
{"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode":
"hash", "type": "sha1"}, "path": "TEST_DIR/PID-t.img", "server": {"host":
"127.0.0.1", "port": "22"}}, "size": 4194304}}}
{"return": {}}
{"execute": "job-dismiss", "arguments": {"id": "job0"}}
{"return": {}}
--
2.20.1
- [Qemu-devel] [PULL 54/71] block/curl: Implement bdrv_refresh_filename(), (continued)
- [Qemu-devel] [PULL 54/71] block/curl: Implement bdrv_refresh_filename(), Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 55/71] block/null: Generate filename even with latency-ns, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 56/71] block: BDS options may lack the "driver" option, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 51/71] block: Do not copy exact_filename from format file, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 50/71] block: Purify .bdrv_refresh_filename(), Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 58/71] iotests: Re-add filename filters, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 59/71] iotests: Fix 237 for Python 2.x, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 60/71] iotests: Remove superfluous rm from 232, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 57/71] iotests: Test json:{} filenames of internal BDSs, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 61/71] iotests: Fix 232 for LUKS, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 62/71] iotests: Fix 207 to use QMP filters for qmp_log,
Kevin Wolf <=
- [Qemu-devel] [PULL 63/71] iotests.py: Add is_str(), Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 65/71] iotests: Filter SSH paths, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 64/71] iotests.py: Filter filename in any string value, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 66/71] iotests: Let 045 be run concurrently, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 69/71] iotests: add LUKS payload overhead to 178 qemu-img measure test, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 70/71] vmdk: false positive of compat6 with hwversion not set, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 68/71] qcow2: include LUKS payload overhead in qemu-img measure, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 71/71] iotests: Skip 211 on insufficient memory, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 67/71] iotests.py: s/_/-/g on keys in qmp_log(), Kevin Wolf, 2019/02/25
- Re: [Qemu-devel] [PULL 00/71] Block layer patches, no-reply, 2019/02/27