[Spice-devel] [spice v1 1/8] tests: migrate: fix events race
Victor Toso
victortoso at redhat.com
Mon Oct 7 12:19:28 UTC 2019
From: Victor Toso <me at victortoso.com>
Currently, when we run migrate.py with --client option we get stuck
waiting for SPICE_CONNECTED event on target qmp (while receiving only
QMP). Problem is, only after event SPICE_INITIALIZED in the source qmp
is that the client will be able to do migration (to properly exchange
spice messages).
So, it is a must that if we have a test where a client is connected,
to wait for SPICE_INITIALIZED event in the source qmp.
To clarify, this patches fixes the following test:
./migrate.py --client spicy
Signed-off-by: Victor Toso <victortoso at redhat.com>
---
tests/migrate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/migrate.py b/tests/migrate.py
index 87a32eb0..e283ad0f 100755
--- a/tests/migrate.py
+++ b/tests/migrate.py
@@ -194,7 +194,7 @@ class Migrator(object):
raw_input()
# Tester can launch its own client or we wait start_client() to connect
- if wait_user_connect:
+ if self.connected_client or wait_user_connect:
wait_for_event(self.active.qmp, 'SPICE_INITIALIZED')
self.active.qmp.cmd('client_migrate_info', {'protocol':'spice',
--
2.21.0
More information about the Spice-devel
mailing list