tests/qtest: precopy migration with suspend

Add a test case to verify that the suspended state is handled correctly
during live migration precopy.  The test suspends the src, migrates, then
wakes the dest.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/1704312341-66640-12-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
Steve Sistare 2024-01-03 12:05:40 -08:00 committed by Peter Xu
parent 5014478e0d
commit b1fdd21e8c
3 changed files with 64 additions and 3 deletions

View file

@ -32,6 +32,9 @@ bool migrate_watch_for_events(QTestState *who, const char *name,
if (g_str_equal(name, "STOP")) {
state->stop_seen = true;
return true;
} else if (g_str_equal(name, "SUSPEND")) {
state->suspend_seen = true;
return true;
} else if (g_str_equal(name, "RESUME")) {
state->resume_seen = true;
return true;