[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 38/42] iotests: Let complete_and_wait() work
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-devel] [PATCH v6 38/42] iotests: Let complete_and_wait() work with commit |
Date: |
Fri, 23 Aug 2019 05:59:25 +0000 |
09.08.2019 19:14, Max Reitz wrote:
> 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 <address@hidden>
> ---
> 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 84438e837c..3ef846d1dc 100644
> --- a/tests/qemu-iotests/iotests.py
> +++ b/tests/qemu-iotests/iotests.py
> @@ -761,8 +761,12 @@ class QMPTestCase(unittest.TestCase):
>
> def wait_ready(self, drive='drive0'):
> '''Wait until a block job BLOCK_JOB_READY event'''
> - f = {'data': {'type': 'mirror', 'device': drive } }
> - event = self.vm.event_wait(name='BLOCK_JOB_READY', match=f)
> + event = 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)
> @@ -780,7 +784,7 @@ class QMPTestCase(unittest.TestCase):
> self.assert_qmp(result, 'return', {})
>
> event = self.wait_until_completed(drive=drive)
> - self.assert_qmp(event, 'data/type', 'mirror')
> + self.assertTrue(event['data']['type'] in ['mirror', 'commit'])
>
> def pause_wait(self, job_id='job0'):
> with Timeout(1, "Timeout waiting for job to pause"):
>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
--
Best regards,
Vladimir
- Re: [Qemu-devel] [PATCH v6 28/42] stream: Deal with filters, (continued)
- [Qemu-devel] [PATCH v6 29/42] nbd: Use CAF when looking for dirty bitmap, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 30/42] qemu-img: Use child access functions, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 31/42] block: Drop backing_bs(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 32/42] block: Make bdrv_get_cumulative_perm() public, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 33/42] blockdev: Fix active commit choice, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 38/42] iotests: Let complete_and_wait() work with commit, Max Reitz, 2019/08/09
- Re: [Qemu-devel] [PATCH v6 38/42] iotests: Let complete_and_wait() work with commit,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH v6 34/42] block: Inline bdrv_co_block_status_from_*(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 36/42] iotests: Add tests for mirror @replaces loops, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 35/42] block: Fix check_to_replace_node(), Max Reitz, 2019/08/09
[Qemu-devel] [PATCH v6 37/42] block: Leave BDS.backing_file constant, Max Reitz, 2019/08/09