When QEMU has been compiled with "--without-default-devices", the
migration cpr-tests are currently failing since the first test leaves
a socket file behind that avoids that the second test can be initialized
correctly. Make sure that we delete the socket file in case that the
migrate_start() failed due to the missing machine.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250930090932.235151-1-thuth@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
.start_hook = test_mode_transfer_start,
};
- test_precopy_common(&args);
+ if (test_precopy_common(&args) < 0) {
+ close(cpr_sockfd);
+ unlink(cpr_path);
+ }
}
static void test_mode_transfer(void)
migrate_postcopy_complete(from, to, args);
}
-void test_precopy_common(MigrateCommon *args)
+int test_precopy_common(MigrateCommon *args)
{
QTestState *from, *to;
void *data_hook = NULL;
g_assert(!args->cpr_channel || args->connect_channels);
if (migrate_start(&from, &to, args->listen_uri, &args->start)) {
- return;
+ return -1;
}
if (args->start_hook) {
}
migrate_end(from, to, args->result == MIG_TEST_SUCCEED);
+
+ return 0;
}
static void file_dirty_offset_region(void)
void test_postcopy_common(MigrateCommon *args);
void test_postcopy_recovery_common(MigrateCommon *args);
-void test_precopy_common(MigrateCommon *args);
+int test_precopy_common(MigrateCommon *args);
void test_file_common(MigrateCommon *args, bool stop_src);
void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from,
QTestState *to,