aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/migration-helpers.h
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@suse.de>2023-07-12 16:07:38 -0300
committerJuan Quintela <quintela@redhat.com>2023-10-11 11:17:02 +0200
commit28fa97e00698eecc9a7f7eeca43ccbdee3d33b3e (patch)
tree6504370b03a9d421ce454b8d360f457ebc33021a /tests/qtest/migration-helpers.h
parent9d47929034eb8f3e67411926bdd1e8246d2797ed (diff)
downloadqemu-28fa97e00698eecc9a7f7eeca43ccbdee3d33b3e.zip
qemu-28fa97e00698eecc9a7f7eeca43ccbdee3d33b3e.tar.gz
qemu-28fa97e00698eecc9a7f7eeca43ccbdee3d33b3e.tar.bz2
tests/qtest: migration: Add migrate_incoming_qmp helper
file-based migration requires the target to initiate its migration after the source has finished writing out the data in the file. Currently there's no easy way to initiate 'migrate-incoming', allow this by introducing migrate_incoming_qmp helper, similarly to migrate_qmp. Also make sure migration events are enabled and wait for the incoming migration to start before returning. This avoid a race when querying the migration status too soon after issuing the command. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230712190742.22294-3-farosas@suse.de>
Diffstat (limited to 'tests/qtest/migration-helpers.h')
-rw-r--r--tests/qtest/migration-helpers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helpers.h
index 484d7c9..57d295a 100644
--- a/tests/qtest/migration-helpers.h
+++ b/tests/qtest/migration-helpers.h
@@ -23,6 +23,10 @@ bool migrate_watch_for_resume(QTestState *who, const char *name,
G_GNUC_PRINTF(3, 4)
void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...);
+G_GNUC_PRINTF(3, 4)
+void migrate_incoming_qmp(QTestState *who, const char *uri,
+ const char *fmt, ...);
+
void migrate_set_capability(QTestState *who, const char *capability,
bool value);