2019-12-16 13:59:44 +03:00
|
|
|
/*
|
|
|
|
* QTest migration helpers
|
|
|
|
*
|
|
|
|
* Copyright (c) 2016-2018 Red Hat, Inc. and/or its affiliates
|
|
|
|
* based on the vhost-user-test.c that is:
|
|
|
|
* Copyright (c) 2014 Virtual Open Systems Sarl.
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*
|
|
|
|
*/
|
2022-05-06 16:49:09 +03:00
|
|
|
|
|
|
|
#ifndef MIGRATION_HELPERS_H
|
|
|
|
#define MIGRATION_HELPERS_H
|
2019-12-16 13:59:44 +03:00
|
|
|
|
2022-03-30 12:39:05 +03:00
|
|
|
#include "libqtest.h"
|
2019-12-16 13:59:44 +03:00
|
|
|
|
2023-06-01 19:13:42 +03:00
|
|
|
bool migrate_watch_for_stop(QTestState *who, const char *name,
|
|
|
|
QDict *event, void *opaque);
|
2023-06-01 19:13:44 +03:00
|
|
|
bool migrate_watch_for_resume(QTestState *who, const char *name,
|
|
|
|
QDict *event, void *opaque);
|
2019-12-16 13:59:44 +03:00
|
|
|
|
2022-02-20 19:39:25 +03:00
|
|
|
G_GNUC_PRINTF(3, 4)
|
2019-12-16 13:59:44 +03:00
|
|
|
void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...);
|
|
|
|
|
2023-07-12 22:07:38 +03:00
|
|
|
G_GNUC_PRINTF(3, 4)
|
|
|
|
void migrate_incoming_qmp(QTestState *who, const char *uri,
|
|
|
|
const char *fmt, ...);
|
|
|
|
|
2023-07-12 22:07:41 +03:00
|
|
|
G_GNUC_PRINTF(3, 4)
|
|
|
|
void migrate_qmp_fail(QTestState *who, const char *uri, const char *fmt, ...);
|
|
|
|
|
2023-07-12 22:07:37 +03:00
|
|
|
void migrate_set_capability(QTestState *who, const char *capability,
|
|
|
|
bool value);
|
|
|
|
|
2019-12-16 13:59:44 +03:00
|
|
|
QDict *migrate_query(QTestState *who);
|
2022-04-26 19:00:48 +03:00
|
|
|
QDict *migrate_query_not_failed(QTestState *who);
|
2019-12-16 13:59:44 +03:00
|
|
|
|
|
|
|
void wait_for_migration_status(QTestState *who,
|
|
|
|
const char *goal, const char **ungoals);
|
|
|
|
|
|
|
|
void wait_for_migration_complete(QTestState *who);
|
|
|
|
|
|
|
|
void wait_for_migration_fail(QTestState *from, bool allow_active);
|
|
|
|
|
2023-10-18 22:27:35 +03:00
|
|
|
char *find_common_machine_version(const char *mtype, const char *var1,
|
|
|
|
const char *var2);
|
2023-10-18 22:27:40 +03:00
|
|
|
char *resolve_machine_version(const char *alias, const char *var1,
|
|
|
|
const char *var2);
|
2022-05-06 16:49:09 +03:00
|
|
|
#endif /* MIGRATION_HELPERS_H */
|