[PATCH] iotests.py: Wait for postmigrate in wait_migration

Max Reitz posted 1 patch 4 years, 4 months ago
Test asan failed
Test checkpatch failed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191219155137.2431986-1-mreitz@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/iotests.py | 3 +++
1 file changed, 3 insertions(+)
[PATCH] iotests.py: Wait for postmigrate in wait_migration
Posted by Max Reitz 4 years, 4 months ago
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.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/iotests.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 13fd8b5cd2..4da25c88f5 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -674,6 +674,9 @@ class VM(qtest.QEMUQtestMachine):
             log(event, filters=[filter_qmp_event])
             if event['data']['status'] == 'completed':
                 break
+        # The event may occur in finish-migrate, so wait for postmigrate
+        while self.qmp('query-status')['return']['status'] != 'postmigrate':
+            pass
 
     def node_info(self, node_name):
         nodes = self.qmp('query-named-block-nodes')
-- 
2.23.0


Re: [PATCH] iotests.py: Wait for postmigrate in wait_migration
Posted by Kevin Wolf 4 years, 4 months ago
Am 19.12.2019 um 16:51 hat Max Reitz geschrieben:
> 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.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Thanks, applied to the block branch.

Kevin


Re: [PATCH] iotests.py: Wait for postmigrate in wait_migration
Posted by Kevin Wolf 4 years, 4 months ago
Am 19.12.2019 um 17:01 hat Kevin Wolf geschrieben:
> Am 19.12.2019 um 16:51 hat Max Reitz geschrieben:
> > 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.
> > 
> > Signed-off-by: Max Reitz <mreitz@redhat.com>
> 
> Thanks, applied to the block branch.

...and unqueuing it again because it makes 234 and 262 hang.

Kevin