aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/280
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-12-19 19:36:17 +0100
committerKevin Wolf <kwolf@redhat.com>2020-01-27 17:19:53 +0100
commit8da7969bd7014f6de037d8ae132b40721944b186 (patch)
tree153e874647b5f7da915b1e1032b94338da1737be /tests/qemu-iotests/280
parent105b07f1ba462ec48b27e5cb74ddf81c6a79364c (diff)
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/280')
-rwxr-xr-xtests/qemu-iotests/2802
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qemu-iotests/280 b/tests/qemu-iotests/280
index 0b1fa8e1d8..85e9114c5e 100755
--- a/tests/qemu-iotests/280
+++ b/tests/qemu-iotests/280
@@ -45,7 +45,7 @@ with iotests.FilePath('base') as base_path , \
vm.qmp_log('migrate', uri='exec:cat > /dev/null')
with iotests.Timeout(3, 'Migration does not complete'):
- vm.wait_migration()
+ vm.wait_migration('postmigrate')
iotests.log('\nVM is now stopped:')
iotests.log(vm.qmp('query-migrate')['return']['status'])