diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2023-06-01 17:13:44 +0100 |
|---|---|---|
| committer | Juan Quintela <quintela@redhat.com> | 2023-06-02 11:46:19 +0200 |
| commit | 266ea334b2ea96890e268acff1a26b4a71804361 (patch) | |
| tree | 59e40973158ff15ad9f730b63a6fdd8ea816af7b /tests/qtest/migration-helpers.c | |
| parent | aca040695890fe67b44402fdb167809809946068 (diff) | |
| download | focaccia-qemu-266ea334b2ea96890e268acff1a26b4a71804361.tar.gz focaccia-qemu-266ea334b2ea96890e268acff1a26b4a71804361.zip | |
tests/qtest: capture RESUME events during migration
When running migration tests we monitor for a STOP event so we can skip redundant waits. This will be needed for the RESUME event too shortly. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230601161347.1803440-8-berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'tests/qtest/migration-helpers.c')
| -rw-r--r-- | tests/qtest/migration-helpers.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c index 73e506a5f8..be00c52d00 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -36,6 +36,19 @@ bool migrate_watch_for_stop(QTestState *who, const char *name, return false; } +bool migrate_watch_for_resume(QTestState *who, const char *name, + QDict *event, void *opaque) +{ + bool *seen = opaque; + + if (g_str_equal(name, "RESUME")) { + *seen = true; + return true; + } + + return false; +} + /* * Send QMP command "migrate". * Arguments are built from @fmt... (formatted like |