]> git.proxmox.com Git - mirror_qemu.git/commitdiff
iotests: replace calls to log(qemu_io(...)) with qemu_io_log()
authorJohn Snow <jsnow@redhat.com>
Mon, 18 Apr 2022 21:14:53 +0000 (17:14 -0400)
committerHanna Reitz <hreitz@redhat.com>
Mon, 25 Apr 2022 12:30:02 +0000 (14:30 +0200)
This makes these callsites a little simpler, but the real motivation is
a forthcoming commit will change the return type of qemu_io(), so removing
users of the return value now is helpful.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220418211504.943969-2-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
tests/qemu-iotests/242
tests/qemu-iotests/255
tests/qemu-iotests/303

index b3afd36d7242507205b79869756fde731956d6da..c89f0c6cb322b1d086d868cb421a548b08748d8d 100755 (executable)
@@ -22,8 +22,8 @@
 import iotests
 import json
 import struct
-from iotests import qemu_img_create, qemu_io, qemu_img_info, \
-    file_path, img_info_log, log, filter_qemu_io
+from iotests import qemu_img_create, qemu_io_log, qemu_img_info, \
+    file_path, img_info_log, log
 
 iotests.script_initialize(supported_fmts=['qcow2'],
                           supported_protocols=['file'],
@@ -61,7 +61,7 @@ def add_bitmap(bitmap_number, persistent, disabled):
 
 def write_to_disk(offset, size):
     write = 'write {} {}'.format(offset, size)
-    log(qemu_io('-c', write, disk), filters=[filter_qemu_io])
+    qemu_io_log('-c', write, disk)
 
 
 def toggle_flag(offset):
index f86fa851b62fb4aee6ede6fd14725ef422aff03e..88b29d64b44e46af790b082f79034ec67579a7e7 100755 (executable)
@@ -95,9 +95,7 @@ with iotests.FilePath('src.qcow2') as src_path, \
     iotests.qemu_img_create('-f', iotests.imgfmt, src_path, size_str)
     iotests.qemu_img_create('-f', iotests.imgfmt, dst_path, size_str)
 
-    iotests.log(iotests.qemu_io('-f', iotests.imgfmt, '-c', 'write 0 1M',
-                                src_path),
-                filters=[iotests.filter_test_dir, iotests.filter_qemu_io])
+    iotests.qemu_io_log('-f', iotests.imgfmt, '-c', 'write 0 1M', src_path),
 
     vm.add_object('throttle-group,x-bps-read=4096,id=throttle0')
 
index 40e947f26c8919a340b3526c3498eb7c4df340b0..a8cc6a23dfe746dd2e89bcfbc55307b70a21b303 100755 (executable)
@@ -21,7 +21,7 @@
 
 import iotests
 import subprocess
-from iotests import qemu_img_create, qemu_io, file_path, log, filter_qemu_io, \
+from iotests import qemu_img_create, qemu_io_log, file_path, log, \
         verify_qcow2_zstd_compression
 
 iotests.script_initialize(supported_fmts=['qcow2'],
@@ -45,7 +45,7 @@ def create_bitmap(bitmap_number, disabled):
 
 def write_to_disk(offset, size):
     write = f'write {offset} {size}'
-    log(qemu_io('-c', write, disk), filters=[filter_qemu_io])
+    qemu_io_log('-c', write, disk)
 
 
 def add_bitmap(num, begin, end, disabled):