tests/migration-tests: migration_event_wait()

Introduce a small helper to wait for a migration event, generalized from
the incoming migration path.  Make the helper easier to use by allowing it
to keep waiting until the expected event is received.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
Peter Xu 2024-06-19 18:30:44 -04:00 committed by Fabiano Rosas
parent cd313b66f2
commit d444e5673c
2 changed files with 24 additions and 9 deletions

View file

@ -63,4 +63,6 @@ static inline bool probe_o_direct_support(const char *tmpfs)
}
#endif
void migration_test_add(const char *path, void (*fn)(void));
void migration_event_wait(QTestState *s, const char *target);
#endif /* MIGRATION_HELPERS_H */