]> git.proxmox.com Git - mirror_qemu.git/commitdiff
iotests: 207: Remove duplication with VM.blockdev_create()
authorKevin Wolf <kwolf@redhat.com>
Mon, 16 Dec 2019 17:02:08 +0000 (18:02 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 Dec 2019 13:32:43 +0000 (14:32 +0100)
The blockdev_create() function in this test case adds another filter to
the logging, but provides otherwise the same functionality as
VM.blockdev_create() from iotests.py. Make it a thin wrapper around the
iotests.py function.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/207

index ec8c1d06f00ca19f34a3dedf0842371027798c2b..812ab34e47b26e1a740cf2ea5fcff1d149b807c7 100755 (executable)
@@ -35,13 +35,7 @@ def filter_hash(qmsg):
     return iotests.filter_qmp(qmsg, _filter)
 
 def blockdev_create(vm, options):
-    result = vm.qmp_log('blockdev-create', job_id='job0', options=options,
-                        filters=[iotests.filter_qmp_testfiles, filter_hash])
-
-    if 'return' in result:
-        assert result['return'] == {}
-        vm.run_job('job0')
-    iotests.log("")
+    vm.blockdev_create(options, filters=[iotests.filter_qmp_testfiles, filter_hash])
 
 with iotests.FilePath('t.img') as disk_path, \
      iotests.VM() as vm: