diff options
author | Max Reitz <mreitz@redhat.com> | 2019-12-19 19:36:17 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-01-27 17:19:53 +0100 |
commit | 8da7969bd7014f6de037d8ae132b40721944b186 (patch) | |
tree | 153e874647b5f7da915b1e1032b94338da1737be /tests/qemu-iotests/262 | |
parent | 105b07f1ba462ec48b27e5cb74ddf81c6a79364c (diff) | |
download | qemu-8da7969bd7014f6de037d8ae132b40721944b186.zip qemu-8da7969bd7014f6de037d8ae132b40721944b186.tar.gz qemu-8da7969bd7014f6de037d8ae132b40721944b186.tar.bz2 |
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>
Diffstat (limited to 'tests/qemu-iotests/262')
-rwxr-xr-x | tests/qemu-iotests/262 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/262 b/tests/qemu-iotests/262 index 0963daa..bbcb526 100755 --- a/tests/qemu-iotests/262 +++ b/tests/qemu-iotests/262 @@ -71,9 +71,9 @@ with iotests.FilePath('img') as img_path, \ iotests.log(vm_a.qmp('migrate', uri='exec:cat >%s' % (fifo))) with iotests.Timeout(3, 'Migration does not complete'): # Wait for the source first (which includes setup=setup) - vm_a.wait_migration() + vm_a.wait_migration('postmigrate') # Wait for the destination second (which does not) - vm_b.wait_migration() + vm_b.wait_migration('running') iotests.log(vm_a.qmp('query-migrate')['return']['status']) iotests.log(vm_b.qmp('query-migrate')['return']['status']) |