tests/migration-tests: Verify postcopy-recover-setup status
authorPeter Xu <peterx@redhat.com>
Wed, 19 Jun 2024 22:30:45 +0000 (18:30 -0400)
committerFabiano Rosas <farosas@suse.de>
Fri, 21 Jun 2024 17:37:47 +0000 (14:37 -0300)
Making sure the postcopy-recover-setup status is present in the postcopy
failure unit test.  Note that it only applies to src QEMU not dest.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
tests/qtest/migration-test.c

index 32e31fff86bd8f53b02a474918e077f5f210dd07..e61096adfed86ce0bb9556b81a448b43d2ade4a2 100644 (file)
@@ -1413,6 +1413,12 @@ static void postcopy_recover_fail(QTestState *from, QTestState *to)
     migrate_recover(to, "fd:fd-mig");
     migrate_qmp(from, to, "fd:fd-mig", NULL, "{'resume': true}");
 
+    /*
+     * Source QEMU has an extra RECOVER_SETUP phase, dest doesn't have it.
+     * Make sure it appears along the way.
+     */
+    migration_event_wait(from, "postcopy-recover-setup");
+
     /*
      * Make sure both QEMU instances will go into RECOVER stage, then test
      * kicking them out using migrate-pause.