iotests.py: Let wait_migration wait even more
commit8da7969bd7014f6de037d8ae132b40721944b186
authorMax Reitz <mreitz@redhat.com>
Thu, 19 Dec 2019 18:36:17 +0000 (19 19:36 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 27 Jan 2020 16:19:53 +0000 (27 17:19 +0100)
tree153e874647b5f7da915b1e1032b94338da1737be
parent105b07f1ba462ec48b27e5cb74ddf81c6a79364c
iotests.py: Let wait_migration wait even more

The "migration completed" event may be sent (on the source, to be
specific) before the migration is actually completed, so the VM runstate
will still be "finish-migrate" instead of "postmigrate".  So ask the
users of VM.wait_migration() to specify the final runstate they desire
and then poll the VM until it has reached that state.  (This should be
over very quickly, so busy polling is fine.)

Without this patch, I see intermittent failures in the new iotest 280
under high system load.  I have not yet seen such failures with other
iotests that use VM.wait_migration() and query-status afterwards, but
maybe they just occur even more rarely, or it is because they also wait
on the destination VM to be running.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/234
tests/qemu-iotests/262
tests/qemu-iotests/280
tests/qemu-iotests/iotests.py