[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 55/64] iotests: Let complete_and_wait() work with commit
From: |
Kevin Wolf |
Subject: |
[PULL 55/64] iotests: Let complete_and_wait() work with commit |
Date: |
Mon, 7 Sep 2020 13:09:27 +0200 |
From: Max Reitz <mreitz@redhat.com>
complete_and_wait() and wait_ready() currently only work for mirror
jobs. Let them work for active commit jobs, too.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/iotests.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index e197c73ca5..64ccaf9061 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -972,8 +972,12 @@ class QMPTestCase(unittest.TestCase):
def wait_ready(self, drive='drive0'):
"""Wait until a BLOCK_JOB_READY event, and return the event."""
- f = {'data': {'type': 'mirror', 'device': drive}}
- return self.vm.event_wait(name='BLOCK_JOB_READY', match=f)
+ return self.vm.events_wait([
+ ('BLOCK_JOB_READY',
+ {'data': {'type': 'mirror', 'device': drive}}),
+ ('BLOCK_JOB_READY',
+ {'data': {'type': 'commit', 'device': drive}})
+ ])
def wait_ready_and_cancel(self, drive='drive0'):
self.wait_ready(drive=drive)
@@ -992,7 +996,7 @@ class QMPTestCase(unittest.TestCase):
self.assert_qmp(result, 'return', {})
event = self.wait_until_completed(drive=drive, error=completion_error)
- self.assert_qmp(event, 'data/type', 'mirror')
+ self.assertTrue(event['data']['type'] in ['mirror', 'commit'])
def pause_wait(self, job_id='job0'):
with Timeout(3, "Timeout waiting for job to pause"):
--
2.25.4
- [PULL 45/64] mirror: Deal with filters, (continued)
- [PULL 45/64] mirror: Deal with filters, Kevin Wolf, 2020/09/07
- [PULL 48/64] nbd: Use CAF when looking for dirty bitmap, Kevin Wolf, 2020/09/07
- [PULL 46/64] backup: Deal with filters, Kevin Wolf, 2020/09/07
- [PULL 51/64] blockdev: Fix active commit choice, Kevin Wolf, 2020/09/07
- [PULL 47/64] commit: Deal with filters, Kevin Wolf, 2020/09/07
- [PULL 49/64] qemu-img: Use child access functions, Kevin Wolf, 2020/09/07
- [PULL 50/64] block: Drop backing_bs(), Kevin Wolf, 2020/09/07
- [PULL 42/64] block: Report data child for query-blockstats, Kevin Wolf, 2020/09/07
- [PULL 53/64] block: Leave BDS.backing_{file,format} constant, Kevin Wolf, 2020/09/07
- [PULL 54/64] iotests: Test that qcow2's data-file is flushed, Kevin Wolf, 2020/09/07
- [PULL 55/64] iotests: Let complete_and_wait() work with commit,
Kevin Wolf <=
- [PULL 56/64] iotests: Add filter commit test cases, Kevin Wolf, 2020/09/07
- [PULL 52/64] block: Inline bdrv_co_block_status_from_*(), Kevin Wolf, 2020/09/07
- [PULL 58/64] iotests: Add test for commit in sub directory, Kevin Wolf, 2020/09/07
- [PULL 59/64] iotests: Test committing to overridden backing, Kevin Wolf, 2020/09/07
- [PULL 60/64] iotests: Allow running from different directory, Kevin Wolf, 2020/09/07
- [PULL 61/64] file-win32: Fix "locking" option, Kevin Wolf, 2020/09/07
- [PULL 63/64] block/nvme: Use generic NvmeBar structure, Kevin Wolf, 2020/09/07
- [PULL 57/64] iotests: Add filter mirror test cases, Kevin Wolf, 2020/09/07
- [PULL 62/64] block/nvme: Group controller registers in NVMeRegs structure, Kevin Wolf, 2020/09/07
- [PULL 64/64] block/nvme: Pair doorbell registers, Kevin Wolf, 2020/09/07