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
|
|
|
|
|
|
|
extern bool got_stop;
|
|
|
|
|
2022-02-20 19:39:25 +03:00
|
|
|
G_GNUC_PRINTF(3, 4)
|
2019-12-16 13:59:44 +03:00
|
|
|
QDict *wait_command_fd(QTestState *who, int fd, const char *command, ...);
|
|
|
|
|
2022-02-20 19:39:25 +03:00
|
|
|
G_GNUC_PRINTF(2, 3)
|
2019-12-16 13:59:44 +03:00
|
|
|
QDict *wait_command(QTestState *who, const char *command, ...);
|
|
|
|
|
2022-06-25 20:38:37 +03:00
|
|
|
QDict *qmp_command(QTestState *who, const char *command, ...);
|
|
|
|
|
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, ...);
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
2022-05-06 16:49:09 +03:00
|
|
|
#endif /* MIGRATION_HELPERS_H */
|