diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2019-05-21 20:35:52 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2019-06-04 15:20:41 +0200 |
| commit | ac6fb43eae1f5029b51e0a3d975fe2111cc8b976 (patch) | |
| tree | 3bc948c293963bee87d52e8e9752e05d317dd873 /tests/qemu-iotests/iotests.py | |
| parent | f871abd60f4b67547e62c57c9bec19420052be39 (diff) | |
| download | focaccia-qemu-ac6fb43eae1f5029b51e0a3d975fe2111cc8b976.tar.gz focaccia-qemu-ac6fb43eae1f5029b51e0a3d975fe2111cc8b976.zip | |
iotests: Test commit job start with concurrent I/O
This tests that concurrent requests are correctly drained before making graph modifications instead of running into assertions in bdrv_replace_node(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
| -rw-r--r-- | tests/qemu-iotests/iotests.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 7bde380d96..6bcddd8870 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -126,6 +126,11 @@ def qemu_img_pipe(*args): sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode, ' '.join(qemu_img_args + list(args)))) return subp.communicate()[0] +def qemu_img_log(*args): + result = qemu_img_pipe(*args) + log(result, filters=[filter_testfiles]) + return result + def img_info_log(filename, filter_path=None, imgopts=False, extra_args=[]): args = [ 'info' ] if imgopts: @@ -533,7 +538,8 @@ class VM(qtest.QEMUQtestMachine): return result # Returns None on success, and an error string on failure - def run_job(self, job, auto_finalize=True, auto_dismiss=False): + def run_job(self, job, auto_finalize=True, auto_dismiss=False, + pre_finalize=None): error = None while True: for ev in self.get_qmp_events_filtered(wait=True): @@ -546,6 +552,8 @@ class VM(qtest.QEMUQtestMachine): error = j['error'] log('Job failed: %s' % (j['error'])) elif status == 'pending' and not auto_finalize: + if pre_finalize: + pre_finalize() self.qmp_log('job-finalize', id=job) elif status == 'concluded' and not auto_dismiss: self.qmp_log('job-dismiss', id=job) |