qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iotests.py: Wait for postmigrate in wait_migration
@ 2019-12-19 15:51 Max Reitz
  2019-12-19 16:01 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Max Reitz @ 2019-12-19 15:51 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, qemu-devel, Max Reitz

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-19 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-19 15:51 [PATCH] iotests.py: Wait for postmigrate in wait_migration Max Reitz
2019-12-19 16:01 ` Kevin Wolf
2019-12-19 17:08   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).