tests/qtest: migration: Add migrate_incoming_qmp helper
[qemu/armbru.git] / tests / qtest / migration-helpers.h
blob57d295a4fe473a56644e3e4788802af743003fde
1 /*
2 * QTest migration helpers
4 * Copyright (c) 2016-2018 Red Hat, Inc. and/or its affiliates
5 * based on the vhost-user-test.c that is:
6 * Copyright (c) 2014 Virtual Open Systems Sarl.
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.
9 * See the COPYING file in the top-level directory.
13 #ifndef MIGRATION_HELPERS_H
14 #define MIGRATION_HELPERS_H
16 #include "libqtest.h"
18 bool migrate_watch_for_stop(QTestState *who, const char *name,
19 QDict *event, void *opaque);
20 bool migrate_watch_for_resume(QTestState *who, const char *name,
21 QDict *event, void *opaque);
23 G_GNUC_PRINTF(3, 4)
24 void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...);
26 G_GNUC_PRINTF(3, 4)
27 void migrate_incoming_qmp(QTestState *who, const char *uri,
28 const char *fmt, ...);
30 void migrate_set_capability(QTestState *who, const char *capability,
31 bool value);
33 QDict *migrate_query(QTestState *who);
34 QDict *migrate_query_not_failed(QTestState *who);
36 void wait_for_migration_status(QTestState *who,
37 const char *goal, const char **ungoals);
39 void wait_for_migration_complete(QTestState *who);
41 void wait_for_migration_fail(QTestState *from, bool allow_active);
43 #endif /* MIGRATION_HELPERS_H */