[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 31/42] migration-test: Preffer to->uri to uri parameter for migra
From: |
Juan Quintela |
Subject: |
[PATCH 31/42] migration-test: Preffer to->uri to uri parameter for migration |
Date: |
Fri, 9 Jun 2023 00:49:32 +0200 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
tests/qtest/migration-test.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 6438379dcf..0afe871cfb 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -667,12 +667,22 @@ static void migrate_postcopy_start(GuestState *from,
GuestState *to)
static void do_migrate(GuestState *from, GuestState *to, const gchar *uri)
{
- if (!uri) {
- g_autofree char *tcp_uri =
- migrate_get_socket_address(to->qs, "socket-address");
- migrate_qmp(from->qs, tcp_uri, "{}");
+ if (to->uri) {
+ if (strncmp(to->uri, "tcp:", strlen("tcp:")) == 0) {
+ g_autofree char *tcp_uri =
+ migrate_get_socket_address(to->qs, "socket-address");
+ migrate_qmp(from->qs, tcp_uri, "{}");
+ } else {
+ migrate_qmp(from->qs, to->uri, "{}");
+ }
} else {
- migrate_qmp(from->qs, uri, "{}");
+ if (!uri) {
+ g_autofree char *tcp_uri =
+ migrate_get_socket_address(to->qs, "socket-address");
+ migrate_qmp(from->qs, tcp_uri, "{}");
+ } else {
+ migrate_qmp(from->qs, uri, "{}");
+ }
}
}
--
2.40.1
- Re: [PATCH 24/42] migration-test: Re-enable multifd_cancel test, (continued)
[PATCH 26/42] migration-test: create guest_use_shmem(), Juan Quintela, 2023/06/08
[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 <=
[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, 2023/06/08
[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