diff options
| author | Fabiano Rosas <farosas@suse.de> | 2024-11-27 15:29:00 -0300 |
|---|---|---|
| committer | Fabiano Rosas <farosas@suse.de> | 2024-12-12 10:25:41 -0300 |
| commit | 44bd87a500dabf65d21b704c9ce61a44e8ff60eb (patch) | |
| tree | c959ab3b1245dc58c94a4f9e4d831b705b9bb2d1 /tests/qtest/migration-test.c | |
| parent | 8a645544565c14cf1ac1b57ad2ef4f77a9446b7d (diff) | |
| download | focaccia-qemu-44bd87a500dabf65d21b704c9ce61a44e8ff60eb.tar.gz focaccia-qemu-44bd87a500dabf65d21b704c9ce61a44e8ff60eb.zip | |
tests/qtest/migration: Split CPR tests
Move the mode/reboot test into a separate file to hold all the CPR tests. Currently there's just one test, but we're adding more CPR modes and the feature is different enough from live migration that it's worth it to have a separate file for it. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'tests/qtest/migration-test.c')
| -rw-r--r-- | tests/qtest/migration-test.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 76ba820fe4..0d1c8154d7 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -145,31 +145,6 @@ static void test_ignore_shared(void) } #endif -static void *migrate_hook_start_mode_reboot(QTestState *from, QTestState *to) -{ - migrate_set_parameter_str(from, "mode", "cpr-reboot"); - migrate_set_parameter_str(to, "mode", "cpr-reboot"); - - migrate_set_capability(from, "x-ignore-shared", true); - migrate_set_capability(to, "x-ignore-shared", true); - - return NULL; -} - -static void test_mode_reboot(void) -{ - g_autofree char *uri = g_strdup_printf("file:%s/%s", tmpfs, - FILE_TEST_FILENAME); - MigrateCommon args = { - .start.use_shmem = true, - .connect_uri = uri, - .listen_uri = "defer", - .start_hook = migrate_hook_start_mode_reboot, - }; - - test_file_common(&args, true); -} - static void do_test_validate_uuid(MigrateStart *args, bool should_fail) { g_autofree char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs); @@ -308,20 +283,13 @@ int main(int argc, char **argv) migration_test_add_postcopy(env); migration_test_add_file(env); migration_test_add_precopy(env); + migration_test_add_cpr(env); migration_test_add("/migration/bad_dest", test_baddest); #ifndef _WIN32 migration_test_add("/migration/analyze-script", test_analyze_script); #endif - /* - * Our CI system has problems with shared memory. - * Don't run this test until we find a workaround. - */ - if (getenv("QEMU_TEST_FLAKY_TESTS")) { - migration_test_add("/migration/mode/reboot", test_mode_reboot); - } - /* migration_test_add("/migration/ignore_shared", test_ignore_shared); */ migration_test_add("/migration/validate_uuid", test_validate_uuid); |