[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] iotests: Fix status checks
|
From: |
Eric Blake |
|
Subject: |
Re: [PATCH] iotests: Fix status checks |
|
Date: |
Fri, 25 Mar 2022 09:59:31 -0500 |
|
User-agent: |
NeoMutt/20211029-512-43304b |
On Thu, Mar 24, 2022 at 07:02:21PM +0100, Hanna Reitz wrote:
> An iotest's 'paused' condition is fickle; it will be reported as true
> whenever the job is drained, for example, or when it is in the process
> of completing.
>
> 030 and 041 contain such checks, we should replace them by checking the
> job status instead. (As was done for 129 in commit f9a6256b48f29c2816
> for the 'busy' condition.)
>
> Additionally, when we want to test that a job is paused on error, we
> might want to give it some time to actually switch to the paused state.
> Do that by waiting on the corresponding JOB_STATUS_CHANGE event. (But
> only if they are not already paused; the loops these places are in fetch
> all VM events, so they may have already fetched that event from the
> queue.)
>
> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
> ---
> tests/qemu-iotests/030 | 25 ++++++++++++++++++++-----
> tests/qemu-iotests/041 | 26 +++++++++++++++++++-------
> 2 files changed, 39 insertions(+), 12 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org