summary refs log tree commit diff stats
path: root/tests/qtest/migration-helpers.c
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2024-01-03 12:05:40 -0800
committerPeter Xu <peterx@redhat.com>2024-01-04 09:52:42 +0800
commitb1fdd21e8c2442ec8a68f0c3e67efdb279ecea64 (patch)
tree6898217b9be6879991dac2306abc889e14daf73b /tests/qtest/migration-helpers.c
parent5014478e0dc0e7e542e462fe271a24fd07bd813d (diff)
downloadfocaccia-qemu-b1fdd21e8c2442ec8a68f0c3e67efdb279ecea64.tar.gz
focaccia-qemu-b1fdd21e8c2442ec8a68f0c3e67efdb279ecea64.zip
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>
Diffstat (limited to 'tests/qtest/migration-helpers.c')
-rw-r--r--tests/qtest/migration-helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c
index fd3b94efa2..37e8e812c5 100644
--- a/tests/qtest/migration-helpers.c
+++ b/tests/qtest/migration-helpers.c
@@ -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;