[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3] iotests: Fix 219's timing
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v3] iotests: Fix 219's timing |
Date: |
Wed, 6 Jun 2018 21:04:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 2018-06-06 21:04, Max Reitz wrote:
> 219 has two issues that may lead to sporadic failure, both of which are
> the result of issuing query-jobs too early after a job has been
> modified. This can then lead to different results based on whether the
> modification has taken effect already or not.
>
> First, query-jobs is issued right after the job has been created.
> Besides its current progress possibly being in any random state (which
> has already been taken care of), its total progress too is basically
> arbitrary, because the job may not yet have been able to determine it.
> This patch addresses this by just filtering the total progress, like
> what has been done for the current progress already. However, for more
> clarity, the filtering is changed to replace the values by a string
> 'FILTERED' instead of deleting them.
>
> Secondly, query-jobs is issued right after a job has been resumed. The
> job may or may not yet have had the time to actually perform any I/O,
> and thus its current progress may or may not have advanced. To make
> sure it has indeed advanced (which is what the reference output already
> assumes), keep querying it until it has.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> v3: Keep querying until the job has advanced instead of waiting for a
> fixed amount of time [Peter in v2, Eric in v1]
> ---
> tests/qemu-iotests/219 | 27 +++++++++++++++++++++------
> tests/qemu-iotests/219.out | 10 +++++-----
> 2 files changed, 26 insertions(+), 11 deletions(-)
>
> diff --git a/tests/qemu-iotests/219 b/tests/qemu-iotests/219
> index 898a26eef0..1a0329c6a0 100755
> --- a/tests/qemu-iotests/219
> +++ b/tests/qemu-iotests/219
> @@ -20,6 +20,7 @@
> # Check using the job-* QMP commands with block jobs
>
> import iotests
> +import time
Urgh, now of course we don't need this any more... Will send a v4.
Max
signature.asc
Description: OpenPGP digital signature