qemu-iotests: Avoid unnecessary sleeps
commit2c93c5cb43fd992038711f84ea34c9373273cda6
authorKevin Wolf <kwolf@redhat.com>
Fri, 21 Jul 2017 14:41:21 +0000 (21 16:41 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 24 Jul 2017 13:06:04 +0000 (24 15:06 +0200)
treed083c65aab2baf5cbec6462338bd5010e55257ae
parentd3c8c67469ee70fcae116d5abc277a7ebc8a19fd
qemu-iotests: Avoid unnecessary sleeps

Test cases 030, 041 and 055 used to sleep for a second after calling
block-job-pause to make sure that the block job had time to actually
get into paused state. We can instead poll its status and use that one
second only as a timeout.

The tests also slept a second for checking that the block jobs don't
make progress while being paused. Half a second is more than enough for
this.

These changes reduce the total time for the three tests by 25 seconds on
my laptop (from 155 seconds to 130).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/030
tests/qemu-iotests/041
tests/qemu-iotests/055
tests/qemu-iotests/iotests.py