Daniel P. Berrangé <[email protected]> wrote: > 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. > > Signed-off-by: Daniel P. Berrangé <[email protected]> > --- > tests/qtest/migration-helpers.c | 12 ++++++++++++ > tests/qtest/migration-helpers.h | 2 ++ > tests/qtest/migration-test.c | 5 +++++ > 3 files changed, 19 insertions(+) > > diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c > index 884d8a2e07..d50b565967 100644 > --- a/tests/qtest/migration-helpers.c > +++ b/tests/qtest/migration-helpers.c > @@ -35,6 +35,18 @@ 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 false; > +} > +
I think I am not understanding this. Can we wait for both RESUME and STOP events? Or do you want an implementation that can only look for one event? Later, Juan.
