diff mbox series

[12/67] iotests/228: Filter json:{} filenames

Message ID 20191001194715.2796-13-mreitz@redhat.com
State New
Headers show
Series iotests: Honor $IMGOPTS in Python tests | expand

Commit Message

Max Reitz Oct. 1, 2019, 7:46 p.m. UTC
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(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/228 b/tests/qemu-iotests/228
index 9785868ab3..e507db4f27 100755
--- a/tests/qemu-iotests/228
+++ b/tests/qemu-iotests/228
@@ -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)')
 
diff --git a/tests/qemu-iotests/228.out b/tests/qemu-iotests/228.out
index 4217df24fe..f8155019d5 100644
--- a/tests/qemu-iotests/228.out
+++ b/tests/qemu-iotests/228.out
@@ -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)