iotests: Fix intermittent failure in 219
commitd9efe9384ecb68dcb971b439099e9bead653f96b
authorMax Reitz <mreitz@redhat.com>
Thu, 16 May 2019 16:11:14 +0000 (16 18:11 +0200)
committerMax Reitz <mreitz@redhat.com>
Fri, 14 Jun 2019 12:16:57 +0000 (14 14:16 +0200)
treed081ef5babfbff0e7756ab4e3f330526651ffa8d
parenta3bd71b5773a3664692601e6e181f108e1e4aa41
iotests: Fix intermittent failure in 219

In 219, we wait for the job to make progress before we emit its status.
This makes the output reliable.  We do not wait for any more progress if
the job's current-progress already matches its total-progress.

Unfortunately, there is a bug: Right after the job has been started,
it's possible that total-progress is still 0.  In that case, we may skip
the first progress-making step and keep ending up 64 kB short.

To fix that bug, we can simply wait for total-progress to reach 4 MB
(the image size) after starting the job.

Reported-by: Karen Mezick <kmezick@redhat.com>
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1686651
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190516161114.27596-1-mreitz@redhat.com
Reviewed-by: John Snow <jsnow@redhat.com>
[mreitz: Adjusted commit message as per John's proposal]
Signed-off-by: Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/219