iotests: replace calls to log(qemu_io(...)) with qemu_io_log()
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>
This commit is contained in:
		
							parent
							
								
									80dd5aff1b
								
							
						
					
					
						commit
						093a13acbf
					
				@ -22,8 +22,8 @@
 | 
				
			|||||||
import iotests
 | 
					import iotests
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
import struct
 | 
					import struct
 | 
				
			||||||
from iotests import qemu_img_create, qemu_io, qemu_img_info, \
 | 
					from iotests import qemu_img_create, qemu_io_log, qemu_img_info, \
 | 
				
			||||||
    file_path, img_info_log, log, filter_qemu_io
 | 
					    file_path, img_info_log, log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
iotests.script_initialize(supported_fmts=['qcow2'],
 | 
					iotests.script_initialize(supported_fmts=['qcow2'],
 | 
				
			||||||
                          supported_protocols=['file'],
 | 
					                          supported_protocols=['file'],
 | 
				
			||||||
@ -61,7 +61,7 @@ def add_bitmap(bitmap_number, persistent, disabled):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def write_to_disk(offset, size):
 | 
					def write_to_disk(offset, size):
 | 
				
			||||||
    write = 'write {} {}'.format(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):
 | 
					def toggle_flag(offset):
 | 
				
			||||||
 | 
				
			|||||||
@ -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, src_path, size_str)
 | 
				
			||||||
    iotests.qemu_img_create('-f', iotests.imgfmt, dst_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',
 | 
					    iotests.qemu_io_log('-f', iotests.imgfmt, '-c', 'write 0 1M', src_path),
 | 
				
			||||||
                                src_path),
 | 
					 | 
				
			||||||
                filters=[iotests.filter_test_dir, iotests.filter_qemu_io])
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    vm.add_object('throttle-group,x-bps-read=4096,id=throttle0')
 | 
					    vm.add_object('throttle-group,x-bps-read=4096,id=throttle0')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import iotests
 | 
					import iotests
 | 
				
			||||||
import subprocess
 | 
					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
 | 
					        verify_qcow2_zstd_compression
 | 
				
			||||||
 | 
					
 | 
				
			||||||
iotests.script_initialize(supported_fmts=['qcow2'],
 | 
					iotests.script_initialize(supported_fmts=['qcow2'],
 | 
				
			||||||
@ -45,7 +45,7 @@ def create_bitmap(bitmap_number, disabled):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def write_to_disk(offset, size):
 | 
					def write_to_disk(offset, size):
 | 
				
			||||||
    write = f'write {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):
 | 
					def add_bitmap(num, begin, end, disabled):
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user