Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210330' into...
[qemu/ar7.git] / tests / qtest / migration-helpers.h
blobd63bba9630f9572fe4f33a4f606474d7ee63224c
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.
12 #ifndef MIGRATION_HELPERS_H_
13 #define MIGRATION_HELPERS_H_
15 #include "libqos/libqtest.h"
17 extern bool got_stop;
19 GCC_FMT_ATTR(3, 4)
20 QDict *wait_command_fd(QTestState *who, int fd, const char *command, ...);
22 GCC_FMT_ATTR(2, 3)
23 QDict *wait_command(QTestState *who, const char *command, ...);
25 GCC_FMT_ATTR(3, 4)
26 void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...);
28 QDict *migrate_query(QTestState *who);
30 void wait_for_migration_status(QTestState *who,
31 const char *goal, const char **ungoals);
33 void wait_for_migration_complete(QTestState *who);
35 void wait_for_migration_fail(QTestState *from, bool allow_active);
37 #endif /* MIGRATION_HELPERS_H_ */