tests/qtest/migration: Fix indentations
Select all the code and hit tab. I'll be moving functions around quite a lot in the next patches, so make sure all indentation is correct now. Add parentheses around some expressions to preserve readability. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Message-ID: <20241113194630.3385-2-farosas@suse.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
b2cc699979
commit
19e566162c
@ -113,8 +113,8 @@ static bool ufd_version_check(void)
|
||||
}
|
||||
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;
|
||||
@ -1384,8 +1384,10 @@ static void test_postcopy_preempt_tls_psk(void)
|
||||
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,
|
||||
@ -2575,14 +2577,16 @@ static void test_migrate_fd_finish_hook(QTestState *from,
|
||||
/* Test closing fds */
|
||||
/* We assume, that QEMU removes named fd from its list,
|
||||
* so this should fail */
|
||||
rsp = qtest_qmp(from, "{ 'execute': 'closefd',"
|
||||
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',"
|
||||
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");
|
||||
@ -2741,11 +2745,11 @@ static void test_validate_uri_channels_both_set(void)
|
||||
},
|
||||
.listen_uri = "defer",
|
||||
.connect_uri = "tcp:127.0.0.1:0",
|
||||
.connect_channels = "[ { 'channel-type': 'main',"
|
||||
.connect_channels = ("[ { ""'channel-type': 'main',"
|
||||
" 'addr': { 'transport': 'socket',"
|
||||
" 'type': 'inet',"
|
||||
" 'host': '127.0.0.1',"
|
||||
" 'port': '0' } } ]",
|
||||
" 'port': '0' } } ]"),
|
||||
};
|
||||
|
||||
do_test_validate_uri_channel(&args);
|
||||
@ -3032,11 +3036,11 @@ static void test_multifd_tcp_channels_none(void)
|
||||
.listen_uri = "defer",
|
||||
.start_hook = test_migrate_precopy_tcp_multifd_start,
|
||||
.live = true,
|
||||
.connect_channels = "[ { 'channel-type': 'main',"
|
||||
.connect_channels = ("[ { 'channel-type': 'main',"
|
||||
" 'addr': { 'transport': 'socket',"
|
||||
" 'type': 'inet',"
|
||||
" 'host': '127.0.0.1',"
|
||||
" 'port': '0' } } ]",
|
||||
" 'port': '0' } } ]"),
|
||||
};
|
||||
test_precopy_common(&args);
|
||||
}
|
||||
@ -3668,7 +3672,8 @@ static void test_migrate_dirty_limit(void)
|
||||
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);
|
||||
}
|
||||
@ -3680,7 +3685,8 @@ static void test_migrate_dirty_limit(void)
|
||||
/* 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);
|
||||
@ -3709,7 +3715,8 @@ static void test_migrate_dirty_limit(void)
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user