}
uffd_feature_thread_id = api_struct.features & UFFD_FEATURE_THREAD_ID;
- ioctl_mask = 1ULL << _UFFDIO_REGISTER |
- 1ULL << _UFFDIO_UNREGISTER;
+ ioctl_mask = (1ULL << _UFFDIO_REGISTER |
+ 1ULL << _UFFDIO_UNREGISTER);
if ((api_struct.ioctls & ioctl_mask) != ioctl_mask) {
g_test_message("Skipping test: Missing userfault feature");
return false;
}
static long long migrate_get_parameter_bool(QTestState *who,
- const char *parameter)
+ const char *parameter)
{
QDict *rsp;
int result;
}
static void migrate_check_parameter_bool(QTestState *who, const char *parameter,
- int value)
+ int value)
{
int result;
}
static void migrate_set_parameter_bool(QTestState *who, const char *parameter,
- int value)
+ int value)
{
qtest_qmp_assert_success(who,
"{ 'execute': 'migrate-set-parameters',"
static void wait_for_postcopy_status(QTestState *one, const char *status)
{
wait_for_migration_status(one, status,
- (const char * []) { "failed", "active",
- "completed", NULL });
+ (const char * []) {
+ "failed", "active",
+ "completed", NULL
+ });
}
static void postcopy_recover_fail(QTestState *from, QTestState *to,
/* Test closing fds */
/* We assume, that QEMU removes named fd from its list,
* so this should fail */
- rsp = qtest_qmp(from, "{ 'execute': 'closefd',"
- " 'arguments': { 'fdname': 'fd-mig' }}");
+ rsp = qtest_qmp(from,
+ "{ 'execute': 'closefd',"
+ " 'arguments': { 'fdname': 'fd-mig' }}");
g_assert_true(qdict_haskey(rsp, "error"));
error_desc = qdict_get_str(qdict_get_qdict(rsp, "error"), "desc");
g_assert_cmpstr(error_desc, ==, "File descriptor named 'fd-mig' not found");
qobject_unref(rsp);
- rsp = qtest_qmp(to, "{ 'execute': 'closefd',"
- " 'arguments': { 'fdname': 'fd-mig' }}");
+ rsp = qtest_qmp(to,
+ "{ 'execute': 'closefd',"
+ " 'arguments': { 'fdname': 'fd-mig' }}");
g_assert_true(qdict_haskey(rsp, "error"));
error_desc = qdict_get_str(qdict_get_qdict(rsp, "error"), "desc");
g_assert_cmpstr(error_desc, ==, "File descriptor named 'fd-mig' not found");
},
.listen_uri = "defer",
.connect_uri = "tcp:127.0.0.1:0",
- .connect_channels = "[ { 'channel-type': 'main',"
- " 'addr': { 'transport': 'socket',"
- " 'type': 'inet',"
- " 'host': '127.0.0.1',"
- " 'port': '0' } } ]",
+ .connect_channels = ("[ { ""'channel-type': 'main',"
+ " 'addr': { 'transport': 'socket',"
+ " 'type': 'inet',"
+ " 'host': '127.0.0.1',"
+ " 'port': '0' } } ]"),
};
do_test_validate_uri_channel(&args);
#ifdef CONFIG_QPL
static void *
test_migrate_precopy_tcp_multifd_qpl_start(QTestState *from,
- QTestState *to)
+ QTestState *to)
{
return test_migrate_precopy_tcp_multifd_start_common(from, to, "qpl");
}
.listen_uri = "defer",
.start_hook = test_migrate_precopy_tcp_multifd_start,
.live = true,
- .connect_channels = "[ { 'channel-type': 'main',"
- " 'addr': { 'transport': 'socket',"
- " 'type': 'inet',"
- " 'host': '127.0.0.1',"
- " 'port': '0' } } ]",
+ .connect_channels = ("[ { 'channel-type': 'main',"
+ " 'addr': { 'transport': 'socket',"
+ " 'type': 'inet',"
+ " 'host': '127.0.0.1',"
+ " 'port': '0' } } ]"),
};
test_precopy_common(&args);
}
throttle_us_per_full = 0;
while (throttle_us_per_full == 0) {
throttle_us_per_full =
- read_migrate_property_int(from, "dirty-limit-throttle-time-per-round");
+ read_migrate_property_int(from,
+ "dirty-limit-throttle-time-per-round");
usleep(100);
g_assert_false(src_state.stop_seen);
}
/* Check if dirty limit throttle switched off, set timeout 1ms */
do {
throttle_us_per_full =
- read_migrate_property_int(from, "dirty-limit-throttle-time-per-round");
+ read_migrate_property_int(from,
+ "dirty-limit-throttle-time-per-round");
usleep(100);
g_assert_false(src_state.stop_seen);
} while (throttle_us_per_full != 0 && --max_try_count);
throttle_us_per_full = 0;
while (throttle_us_per_full == 0) {
throttle_us_per_full =
- read_migrate_property_int(from, "dirty-limit-throttle-time-per-round");
+ read_migrate_property_int(from,
+ "dirty-limit-throttle-time-per-round");
usleep(100);
g_assert_false(src_state.stop_seen);
}
#endif
#ifdef CONFIG_QATZIP
migration_test_add("/migration/multifd/tcp/plain/qatzip",
- test_multifd_tcp_qatzip);
+ test_multifd_tcp_qatzip);
#endif
#ifdef CONFIG_QPL
migration_test_add("/migration/multifd/tcp/plain/qpl",