[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 35/42] migration-test: Set uri for tcp tests with guest_set_uri()
From: |
Juan Quintela |
Subject: |
[PATCH 35/42] migration-test: Set uri for tcp tests with guest_set_uri() |
Date: |
Fri, 9 Jun 2023 00:49:36 +0200 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
tests/qtest/migration-test.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 76a5f8d353..8d497d0940 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1423,7 +1423,8 @@ static void test_baddest(void)
guest_hide_stderr(from);
guest_hide_stderr(to);
- test_migrate_start(from, to, "tcp:127.0.0.1:0", &args);
+ guest_set_uri(to, "tcp:127.0.0.1:0");
+ test_migrate_start(from, to, NULL, &args);
/*
* Don't change to do_migrate(). We are using a wrong uri on purpose.
*/
@@ -1722,10 +1723,9 @@ static void test_precopy_tcp_plain(void)
{
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
- MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
- };
+ MigrateCommon args = { };
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1735,11 +1735,11 @@ static void test_precopy_tcp_tls_psk_match(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_psk_start_match,
.finish_hook = test_migrate_tls_psk_finish,
};
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1748,7 +1748,6 @@ static void test_precopy_tcp_tls_psk_mismatch(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_psk_start_mismatch,
.finish_hook = test_migrate_tls_psk_finish,
.result = MIG_TEST_FAIL,
@@ -1756,6 +1755,7 @@ static void test_precopy_tcp_tls_psk_mismatch(void)
guest_hide_stderr(from);
guest_hide_stderr(to);
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1765,11 +1765,11 @@ static void test_precopy_tcp_tls_x509_default_host(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_x509_start_default_host,
.finish_hook = test_migrate_tls_x509_finish,
};
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1778,11 +1778,11 @@ static void
test_precopy_tcp_tls_x509_override_host(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_x509_start_override_host,
.finish_hook = test_migrate_tls_x509_finish,
};
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1791,7 +1791,6 @@ static void test_precopy_tcp_tls_x509_mismatch_host(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_x509_start_mismatch_host,
.finish_hook = test_migrate_tls_x509_finish,
.result = MIG_TEST_FAIL_DEST_QUIT_ERR,
@@ -1799,6 +1798,7 @@ static void test_precopy_tcp_tls_x509_mismatch_host(void)
guest_hide_stderr(from);
guest_hide_stderr(to);
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1807,11 +1807,11 @@ static void
test_precopy_tcp_tls_x509_friendly_client(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_x509_start_friendly_client,
.finish_hook = test_migrate_tls_x509_finish,
};
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1820,7 +1820,6 @@ static void test_precopy_tcp_tls_x509_hostile_client(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_x509_start_hostile_client,
.finish_hook = test_migrate_tls_x509_finish,
.result = MIG_TEST_FAIL,
@@ -1828,6 +1827,7 @@ static void test_precopy_tcp_tls_x509_hostile_client(void)
guest_hide_stderr(from);
guest_hide_stderr(to);
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1836,11 +1836,11 @@ static void
test_precopy_tcp_tls_x509_allow_anon_client(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_x509_start_allow_anon_client,
.finish_hook = test_migrate_tls_x509_finish,
};
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
@@ -1849,7 +1849,6 @@ static void
test_precopy_tcp_tls_x509_reject_anon_client(void)
GuestState *from = guest_create("source");
GuestState *to = guest_create("target");
MigrateCommon args = {
- .listen_uri = "tcp:127.0.0.1:0",
.start_hook = test_migrate_tls_x509_start_reject_anon_client,
.finish_hook = test_migrate_tls_x509_finish,
.result = MIG_TEST_FAIL,
@@ -1857,6 +1856,7 @@ static void
test_precopy_tcp_tls_x509_reject_anon_client(void)
guest_hide_stderr(from);
guest_hide_stderr(to);
+ guest_set_uri(to, "tcp:127.0.0.1:0");
test_precopy_common(from, to, &args);
}
#endif /* CONFIG_TASN1 */
--
2.40.1
- [PATCH 29/42] migration-test: Create the migration unix socket by guest, (continued)
- [PATCH 29/42] migration-test: Create the migration unix socket by guest, Juan Quintela, 2023/06/08
- [PATCH 25/42] migration-test: We were not waiting for "target" to finish, Juan Quintela, 2023/06/08
- [PATCH 27/42] migration-test: Create guest_extra_opts(), Juan Quintela, 2023/06/08
- [PATCH 28/42] migration-test: Create guest_hide_stderr(), Juan Quintela, 2023/06/08
- [PATCH 30/42] migration-test: Hooks also need GuestState, Juan Quintela, 2023/06/08
- [PATCH 32/42] migration-test: Create guest_set_uri(), Juan Quintela, 2023/06/08
- [PATCH 33/42] migration-test: Remove connect_uri, Juan Quintela, 2023/06/08
- [PATCH 31/42] migration-test: Preffer to->uri to uri parameter for migration, Juan Quintela, 2023/06/08
- [PATCH 36/42] migration-test: Remove unused listen_uri, Juan Quintela, 2023/06/08
- [PATCH 34/42] migration-test: Use new schema for all tests that use unix sockets, Juan Quintela, 2023/06/08
- [PATCH 35/42] migration-test: Set uri for tcp tests with guest_set_uri(),
Juan Quintela <=
- [PATCH 37/42] migration-test: Create get_event GuestState variable, Juan Quintela, 2023/06/08
- [PATCH 38/42] migration-test: Create guest_realize(), Juan Quintela, 2023/06/08
- [PATCH 39/42] migration-test: Unfold test_migrate_end() into three functions, Juan Quintela, 2023/06/08
- [PATCH 40/42] migration-test: Create migrate_incoming() function, Juan Quintela, 2023/06/08
- [PATCH 41/42] migration-test: Move functions to migration-helpers.c, Juan Quintela, 2023/06/08
- [PATCH 42/42] migration-test: Split vcpu-dirty-limit-test, Juan Quintela, 2023/06/08