]>
git.proxmox.com Git - mirror_qemu.git/blob - tests/qtest/migration-helpers.h
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
18 typedef struct QTestMigrationState
{
23 } QTestMigrationState
;
25 bool migrate_watch_for_events(QTestState
*who
, const char *name
,
26 QDict
*event
, void *opaque
);
29 void migrate_qmp(QTestState
*who
, const char *uri
, const char *fmt
, ...);
32 void migrate_incoming_qmp(QTestState
*who
, const char *uri
,
33 const char *fmt
, ...);
36 void migrate_qmp_fail(QTestState
*who
, const char *uri
, const char *fmt
, ...);
38 void migrate_set_capability(QTestState
*who
, const char *capability
,
41 QDict
*migrate_query(QTestState
*who
);
42 QDict
*migrate_query_not_failed(QTestState
*who
);
44 void wait_for_migration_status(QTestState
*who
,
45 const char *goal
, const char **ungoals
);
47 void wait_for_migration_complete(QTestState
*who
);
49 void wait_for_migration_fail(QTestState
*from
, bool allow_active
);
51 char *find_common_machine_version(const char *mtype
, const char *var1
,
53 char *resolve_machine_version(const char *alias
, const char *var1
,
55 void migration_test_add(const char *path
, void (*fn
)(void));
56 #endif /* MIGRATION_HELPERS_H */