xref: /qemu/tests/qtest/migration-test.c (revision 8ee904b3a4b5638a0046ee3e1948d89ecb2e2668)
1 /*
2  * QTest testcase for migration
3  *
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.
7  *
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.
10  *
11  */
12 
13 #include "qemu/osdep.h"
14 #include "migration/framework.h"
15 #include "qemu/module.h"
16 
17 int main(int argc, char **argv)
18 {
19     MigrationTestEnv *env;
20     int ret;
21 
22     g_test_init(&argc, &argv, NULL);
23     env = migration_get_env();
24     module_call_init(MODULE_INIT_QOM);
25 
26     migration_test_add_tls(env);
27     migration_test_add_compression(env);
28     migration_test_add_postcopy(env);
29     migration_test_add_file(env);
30     migration_test_add_precopy(env);
31     migration_test_add_cpr(env);
32     migration_test_add_misc(env);
33 
34     ret = g_test_run();
35 
36     g_assert_cmpint(ret, ==, 0);
37 
38     ret = migration_env_clean(env);
39 
40     return ret;
41 }
42