@@ -22,7 +22,7 @@
import iotests
from iotests import log, qemu_img, filter_testfiles, filter_imgfmt, \
- filter_qmp_testfiles, filter_qmp_imgfmt
+ filter_qmp_testfiles, filter_qmp_imgfmt, filter_json_filename
# Need backing file and change-backing-file support
iotests.script_initialize(supported_fmts=['qcow2', 'qed'])
@@ -32,14 +32,14 @@ def log_node_info(node):
log('')
log('bs->filename: ' + node['image']['filename'],
- filters=[filter_testfiles, filter_imgfmt])
+ filters=[filter_testfiles, filter_imgfmt, filter_json_filename])
log('bs->backing_file: ' + node['backing_file'],
- filters=[filter_testfiles, filter_imgfmt])
+ filters=[filter_testfiles, filter_imgfmt, filter_json_filename])
if 'backing-image' in node['image']:
log('bs->backing->bs->filename: ' +
node['image']['backing-image']['filename'],
- filters=[filter_testfiles, filter_imgfmt])
+ filters=[filter_testfiles, filter_imgfmt, filter_json_filename])
else:
log('bs->backing: (none)')
@@ -17,7 +17,7 @@ bs->backing->bs->filename: TEST_DIR/PID-base.img
{"execute": "change-backing-file", "arguments": {"backing-file": "null-co://", "device": "node0", "image-node-name": "node0"}}
{"return": {}}
-bs->filename: json:{"backing": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-base.img"}}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
+bs->filename: json:{ /* filtered */ }
bs->backing_file: null-co://
bs->backing->bs->filename: TEST_DIR/PID-base.img
@@ -31,7 +31,7 @@ bs->backing->bs->filename: TEST_DIR/PID-base.img
{"execute": "change-backing-file", "arguments": {"backing-file": "file:TEST_DIR/PID-base.img", "device": "node0", "image-node-name": "node0"}}
{"return": {}}
-bs->filename: json:{"backing": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-base.img"}}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
+bs->filename: json:{ /* filtered */ }
bs->backing_file: file:TEST_DIR/PID-base.img
bs->backing->bs->filename: TEST_DIR/PID-base.img
@@ -54,7 +54,7 @@ bs->backing->bs->filename: TEST_DIR/PID-base.img
{"execute": "blockdev-add", "arguments": {"backing": "null", "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-name": "node0"}}
{"return": {}}
-bs->filename: json:{"backing": {"driver": "null-co"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
+bs->filename: json:{ /* filtered */ }
bs->backing_file: null-co://
bs->backing->bs->filename: null-co://
@@ -65,7 +65,7 @@ bs->backing->bs->filename: null-co://
{"execute": "blockdev-add", "arguments": {"backing": null, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-name": "node0"}}
{"return": {}}
-bs->filename: json:{"backing": null, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
+bs->filename: json:{ /* filtered */ }
bs->backing_file: TEST_DIR/PID-base.img
bs->backing: (none)
We only care about where we get json:{} filenames (and what the non-json:{} filenames look like), but not about how the json:{} filenames look. Filter them so we will not get a different output for qcow2 images with external data files. Signed-off-by: Max Reitz <mreitz@redhat.com> --- tests/qemu-iotests/228 | 8 ++++---- tests/qemu-iotests/228.out | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)