iotests: Add qemu_io_log()
Add a function that runs qemu-io and logs the output with the appropriate filters applied. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
3b65081638
commit
a96f0350e3
@ -162,6 +162,11 @@ def qemu_io(*args):
|
||||
sys.stderr.write('qemu-io received signal %i: %s\n' % (-exitcode, ' '.join(args)))
|
||||
return subp.communicate()[0]
|
||||
|
||||
def qemu_io_log(*args):
|
||||
result = qemu_io(*args)
|
||||
log(result, filters=[filter_testfiles, filter_qemu_io])
|
||||
return result
|
||||
|
||||
def qemu_io_silent(*args):
|
||||
'''Run qemu-io and return the exit code, suppressing stdout'''
|
||||
args = qemu_io_args + list(args)
|
||||
|
Loading…
Reference in New Issue
Block a user