Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233090/?format=api
{ "id": 2233090, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233090/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505160915.25558-16-farosas@suse.de/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260505160915.25558-16-farosas@suse.de>", "list_archive_url": null, "date": "2026-05-05T16:09:14", "name": "[v1,15/15] tests/qtest/migration: Unify URIs", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8b80abc090e2934fde0e960f0331a905d572c05f", "submitter": { "id": 85343, "url": "http://patchwork.ozlabs.org/api/1.2/people/85343/?format=api", "name": "Fabiano Rosas", "email": "farosas@suse.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505160915.25558-16-farosas@suse.de/mbox/", "series": [ { "id": 502864, "url": "http://patchwork.ozlabs.org/api/1.2/series/502864/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502864", "date": "2026-05-05T16:09:07", "name": "tests/qtest/migration: Always defer", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502864/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233090/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233090/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=MXHrq+at;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=21+4hvD0;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=MXHrq+at;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=21+4hvD0;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)", "smtp-out1.suse.de;\n\tnone" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g93S12nPlz1yJx\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 02:12:01 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wKIMs-0000mA-MT; Tue, 05 May 2026 12:11:31 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1wKIMb-0000M0-2A\n for qemu-devel@nongnu.org; Tue, 05 May 2026 12:11:13 -0400", "from smtp-out1.suse.de ([195.135.223.130])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1wKIMY-0001HV-LM\n for qemu-devel@nongnu.org; Tue, 05 May 2026 12:11:12 -0400", "from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id 55B4E6B76A;\n Tue, 5 May 2026 16:09:48 +0000 (UTC)", "from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9AA71593A3;\n Tue, 5 May 2026 16:09:46 +0000 (UTC)", "from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id yMSZGkoW+mmNcgAAD6G6ig\n (envelope-from <farosas@suse.de>); Tue, 05 May 2026 16:09:46 +0000" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777997388;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=YKg8mJ+rvLFsh+SlfVpKhwypU3tAlhSOY0TiXz/7ey0=;\n b=MXHrq+attL5hcOtlIYz85n/hZSuG+5WLoGPTn8x48S7iOTAbJ/XA44nNBytI4SC6Xi2dme\n JChd4Uxjfmz/Z0DCEOfAEkaNpjJYjw6UtJwf10Wt1JyV8Q8AnCKtXv19KVFUC/Gz3WOjMA\n qoqrmLJWPjk4FwHAnYJMLLTYJ7+Q4e4=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777997388;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=YKg8mJ+rvLFsh+SlfVpKhwypU3tAlhSOY0TiXz/7ey0=;\n b=21+4hvD00TJUvi+JrH8e5ArDzslszqpdT4nFRs3wX0aaPu86IHrh1U5nP6r5if9yXayHJn\n W45YsomK/BKqEUAQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777997388;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=YKg8mJ+rvLFsh+SlfVpKhwypU3tAlhSOY0TiXz/7ey0=;\n b=MXHrq+attL5hcOtlIYz85n/hZSuG+5WLoGPTn8x48S7iOTAbJ/XA44nNBytI4SC6Xi2dme\n JChd4Uxjfmz/Z0DCEOfAEkaNpjJYjw6UtJwf10Wt1JyV8Q8AnCKtXv19KVFUC/Gz3WOjMA\n qoqrmLJWPjk4FwHAnYJMLLTYJ7+Q4e4=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777997388;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=YKg8mJ+rvLFsh+SlfVpKhwypU3tAlhSOY0TiXz/7ey0=;\n b=21+4hvD00TJUvi+JrH8e5ArDzslszqpdT4nFRs3wX0aaPu86IHrh1U5nP6r5if9yXayHJn\n W45YsomK/BKqEUAQ==" ], "From": "Fabiano Rosas <farosas@suse.de>", "To": "qemu-devel@nongnu.org", "Cc": "Peter Xu <peterx@redhat.com>, Lukas Straub <lukasstraub2@web.de>,\n Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>,\n Mark Kanda <mark.kanda@oracle.com>, Ben Chaney <bchaney@akamai.com>", "Subject": "[PATCH v1 15/15] tests/qtest/migration: Unify URIs", "Date": "Tue, 5 May 2026 13:09:14 -0300", "Message-ID": "<20260505160915.25558-16-farosas@suse.de>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260505160915.25558-1-farosas@suse.de>", "References": "<20260505160915.25558-1-farosas@suse.de>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Spamd-Result": "default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000];\n R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000];\n MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n ARC_NA(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com];\n MIME_TRACE(0.00)[0:+];\n FREEMAIL_CC(0.00)[redhat.com,web.de,oracle.com,akamai.com];\n RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[];\n FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[];\n TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2];\n RCPT_COUNT_SEVEN(0.00)[7];\n DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email];\n FREEMAIL_ENVRCPT(0.00)[web.de]", "X-Spam-Score": "-2.80", "Received-SPF": "pass client-ip=195.135.223.130; envelope-from=farosas@suse.de;\n helo=smtp-out1.suse.de", "X-Spam_score_int": "-43", "X-Spam_score": "-4.4", "X-Spam_bar": "----", "X-Spam_report": "(-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "The migration tests have always used localhost migration and therefore\nthe same URI for both sides of migration. Change the listen_uri and\nconnect_uri into a single uri variable.\n\nFor migrations using sockets, there's the possibility of detecting the\nsocket address the destination side is using. For those, keep using\ndifferent variables for migrate_qmp and migrate_incoming_qmp.\n\nSigned-off-by: Fabiano Rosas <farosas@suse.de>\n---\n tests/qtest/migration/colo-tests.c | 8 ++++----\n tests/qtest/migration/cpr-tests.c | 6 +++---\n tests/qtest/migration/file-tests.c | 10 ++++-----\n tests/qtest/migration/framework.c | 29 ++++++++++-----------------\n tests/qtest/migration/framework.h | 14 ++++++-------\n tests/qtest/migration/misc-tests.c | 4 ++--\n tests/qtest/migration/precopy-tests.c | 17 ++++++++--------\n tests/qtest/migration/tls-tests.c | 2 +-\n 8 files changed, 40 insertions(+), 50 deletions(-)", "diff": "diff --git a/tests/qtest/migration/colo-tests.c b/tests/qtest/migration/colo-tests.c\nindex a3d27e7bf6..f7f9ba491b 100644\n--- a/tests/qtest/migration/colo-tests.c\n+++ b/tests/qtest/migration/colo-tests.c\n@@ -55,12 +55,12 @@ static int test_colo_common(MigrateCommon *args,\n data_hook = args->start_hook(from, to);\n }\n \n- migrate_incoming_qmp(to, args->listen_uri, NULL, \"{}\");\n+ migrate_incoming_qmp(to, args->uri, NULL, \"{}\");\n \n migrate_ensure_converge(from);\n wait_for_serial(\"src_serial\");\n \n- migrate_qmp(from, to, args->connect_uri, NULL, \"{}\");\n+ migrate_qmp(from, to, NULL, NULL, \"{}\");\n \n wait_for_migration_status(from, \"colo\", NULL);\n wait_for_resume(to, get_dst());\n@@ -105,7 +105,7 @@ static void test_colo_plain_common(MigrateCommon *args,\n bool failover_during_checkpoint,\n bool primary_failover)\n {\n- args->listen_uri = \"tcp:127.0.0.1:0\";\n+ args->uri = \"tcp:127.0.0.1:0\";\n test_colo_common(args, failover_during_checkpoint, primary_failover);\n }\n \n@@ -113,7 +113,7 @@ static void test_colo_multifd_common(MigrateCommon *args,\n bool failover_during_checkpoint,\n bool primary_failover)\n {\n- args->listen_uri = \"tcp:127.0.0.1:0\";\n+ args->uri = \"tcp:127.0.0.1:0\";\n args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true;\n test_colo_common(args, failover_during_checkpoint, primary_failover);\n }\ndiff --git a/tests/qtest/migration/cpr-tests.c b/tests/qtest/migration/cpr-tests.c\nindex fc09dad9c0..0bec753b4a 100644\n--- a/tests/qtest/migration/cpr-tests.c\n+++ b/tests/qtest/migration/cpr-tests.c\n@@ -35,7 +35,7 @@ static void test_mode_reboot(char *name, MigrateCommon *args)\n g_autofree char *uri = g_strdup_printf(\"file:%s/%s\", tmpfs,\n FILE_TEST_FILENAME);\n \n- args->connect_uri = uri;\n+ args->uri = uri;\n args->start_hook = migrate_hook_start_mode_reboot;\n \n args->start.mem_type = MEM_TYPE_SHMEM;\n@@ -226,7 +226,7 @@ static void test_cpr_exec(MigrateCommon *args)\n {\n QTestState *from, *to;\n void *data_hook = NULL;\n- g_autofree char *connect_uri = g_strdup(args->connect_uri);\n+ g_autofree char *connect_uri = g_strdup(args->uri);\n g_autofree char *filename = g_strdup_printf(\"%s/%s\", tmpfs,\n FILE_TEST_FILENAME);\n \n@@ -280,7 +280,7 @@ static void test_mode_exec(char *name, MigrateCommon *args)\n {\n g_autofree char *uri = g_strdup_printf(\"file:%s/%s\", tmpfs,\n FILE_TEST_FILENAME);\n- args->connect_uri = uri;\n+ args->uri = uri;\n args->start_hook = test_mode_exec_start;\n \n args->start.only_source = true;\ndiff --git a/tests/qtest/migration/file-tests.c b/tests/qtest/migration/file-tests.c\nindex 36109d30ba..5118d9dec9 100644\n--- a/tests/qtest/migration/file-tests.c\n+++ b/tests/qtest/migration/file-tests.c\n@@ -107,7 +107,7 @@ static void test_precopy_file_offset_fdset(char *name, MigrateCommon *args)\n {\n g_autofree char *uri = g_strdup_printf(\"file:/dev/fdset/1,offset=%d\",\n FILE_TEST_OFFSET);\n- args->connect_uri = uri;\n+ args->uri = uri;\n args->start_hook = migrate_hook_start_file_offset_fdset;\n \n test_file_common(args, false);\n@@ -120,7 +120,7 @@ static void test_precopy_file_offset(char *name, MigrateCommon *args)\n FILE_TEST_FILENAME,\n FILE_TEST_OFFSET);\n \n- args->connect_uri = uri;\n+ args->uri = uri;\n test_file_common(args, false);\n }\n \n@@ -130,7 +130,7 @@ static void test_precopy_file_offset_bad(char *name, MigrateCommon *args)\n g_autofree char *uri = g_strdup_printf(\"file:%s/%s,offset=0x20M\",\n tmpfs, FILE_TEST_FILENAME);\n \n- args->connect_uri = uri;\n+ args->uri = uri;\n args->result = MIG_TEST_QMP_ERROR;\n \n test_file_common(args, false);\n@@ -247,7 +247,7 @@ static void test_multifd_file_mapped_ram_fdset(char *name, MigrateCommon *args)\n g_autofree char *uri = g_strdup_printf(\"file:/dev/fdset/1,offset=%d\",\n FILE_TEST_OFFSET);\n \n- args->connect_uri = uri;\n+ args->uri = uri;\n args->start_hook = migrate_hook_start_multifd_mapped_ram_fdset;\n args->end_hook = migrate_hook_end_multifd_mapped_ram_fdset;\n \n@@ -262,7 +262,7 @@ static void test_multifd_file_mapped_ram_fdset_dio(char *name,\n {\n g_autofree char *uri = g_strdup_printf(\"file:/dev/fdset/1,offset=%d\",\n FILE_TEST_OFFSET);\n- args->connect_uri = uri;\n+ args->uri = uri;\n args->start_hook = migrate_hook_start_multifd_mapped_ram_fdset_dio;\n args->end_hook = migrate_hook_end_multifd_mapped_ram_fdset;\n \ndiff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c\nindex 2acbe709b7..17bcd28c66 100644\n--- a/tests/qtest/migration/framework.c\n+++ b/tests/qtest/migration/framework.c\n@@ -832,14 +832,7 @@ int test_precopy_common(MigrateCommon *args)\n QTestState *from, *to;\n void *data_hook = NULL;\n QObject *channels = NULL;\n-\n- assert(!args->connect_uri);\n-\n- if (args->listen_uri) {\n- args->connect_uri = args->listen_uri;\n- } else {\n- args->listen_uri = \"tcp:127.0.0.1:0\";\n- }\n+ const char *listen_uri = args->uri ?: \"tcp:127.0.0.1:0\";\n \n if (migrate_start(&from, &to, &args->start)) {\n return -1;\n@@ -849,7 +842,7 @@ int test_precopy_common(MigrateCommon *args)\n data_hook = args->start_hook(from, to);\n }\n \n- migrate_incoming_qmp(to, args->listen_uri, NULL, \"{}\");\n+ migrate_incoming_qmp(to, listen_uri, NULL, \"{}\");\n \n /* Wait for the first serial output from the source */\n if (args->result == MIG_TEST_SUCCEED) {\n@@ -879,11 +872,11 @@ int test_precopy_common(MigrateCommon *args)\n }\n \n if (args->result == MIG_TEST_QMP_ERROR) {\n- migrate_qmp_fail(from, args->connect_uri, channels, \"{}\");\n+ migrate_qmp_fail(from, args->uri, channels, \"{}\");\n goto finish;\n }\n \n- migrate_qmp(from, to, args->connect_uri, channels, \"{}\");\n+ migrate_qmp(from, to, args->uri, channels, \"{}\");\n \n if (args->result != MIG_TEST_SUCCEED) {\n bool allow_active = args->result == MIG_TEST_FAIL;\n@@ -947,7 +940,7 @@ void test_precopy_unix_common(MigrateCommon *args)\n {\n g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n \n- args->listen_uri = uri;\n+ args->uri = uri;\n test_precopy_common(args);\n }\n \n@@ -994,9 +987,9 @@ void test_file_common(MigrateCommon *args, bool stop_src)\n return;\n }\n \n- if (!args->connect_uri) {\n+ if (!args->uri) {\n uri = g_strdup_printf(\"file:%s/%s\", tmpfs, FILE_TEST_FILENAME);\n- args->connect_uri = uri;\n+ args->uri = uri;\n }\n \n /*\n@@ -1006,7 +999,7 @@ void test_file_common(MigrateCommon *args, bool stop_src)\n */\n g_assert_false(args->live);\n \n- if (g_strrstr(args->connect_uri, \"offset=\")) {\n+ if (g_strrstr(args->uri, \"offset=\")) {\n check_offset = true;\n /*\n * This comes before the start_hook because it's equivalent to\n@@ -1029,18 +1022,18 @@ void test_file_common(MigrateCommon *args, bool stop_src)\n }\n \n if (args->result == MIG_TEST_QMP_ERROR) {\n- migrate_qmp_fail(from, args->connect_uri, NULL, \"{}\");\n+ migrate_qmp_fail(from, args->uri, NULL, \"{}\");\n goto finish;\n }\n \n- migrate_qmp(from, to, args->connect_uri, NULL, \"{}\");\n+ migrate_qmp(from, to, args->uri, NULL, \"{}\");\n wait_for_migration_complete(from);\n \n /*\n * We need to wait for the source to finish before starting the\n * destination.\n */\n- migrate_incoming_qmp(to, args->connect_uri, NULL, \"{}\");\n+ migrate_incoming_qmp(to, args->uri, NULL, \"{}\");\n wait_for_migration_complete(to);\n \n if (stop_src) {\ndiff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h\nindex 65d3912fda..eceb40abbf 100644\n--- a/tests/qtest/migration/framework.h\n+++ b/tests/qtest/migration/framework.h\n@@ -162,16 +162,14 @@ typedef struct {\n /* Optional: fine tune start parameters */\n MigrateStart start;\n \n- /* Required: the URI for the dst QEMU to listen on */\n- const char *listen_uri;\n-\n /*\n- * Optional: the URI for the src QEMU to connect to\n- * If NULL, then it will query the dst QEMU for its actual\n- * listening address and use that as the connect address.\n- * This allows for dynamically picking a free TCP port.\n+ * Optional: the migration URI. If NULL, the common code should\n+ * provide a default. For socket migration, the source QEMU may\n+ * query the dst QEMU for the listening address and use that as\n+ * the connection address. This allows for dynamically picking a\n+ * free TCP port.\n */\n- const char *connect_uri;\n+ const char *uri;\n \n /*\n * Optional: JSON-formatted list of src QEMU URIs. If a port is\ndiff --git a/tests/qtest/migration/misc-tests.c b/tests/qtest/migration/misc-tests.c\nindex e5d5fc4959..ec6d438cdc 100644\n--- a/tests/qtest/migration/misc-tests.c\n+++ b/tests/qtest/migration/misc-tests.c\n@@ -196,7 +196,7 @@ static void do_test_validate_uri_channel(MigrateCommon *args)\n channels = args->connect_channels ?\n qobject_from_json(args->connect_channels, &error_abort) :\n NULL;\n- migrate_qmp_fail(from, args->connect_uri, channels, \"{}\");\n+ migrate_qmp_fail(from, args->uri, channels, \"{}\");\n \n migrate_end(from, to, false);\n }\n@@ -252,7 +252,7 @@ static void test_validate_caps_pair(char *test_path, MigrateCommon *args)\n \n static void test_validate_uri_channels_both_set(char *name, MigrateCommon *args)\n {\n- args->connect_uri = \"tcp:127.0.0.1:0\",\n+ args->uri = \"tcp:127.0.0.1:0\",\n args->connect_channels = (\"[ { \"\"'channel-type': 'main',\"\n \" 'addr': { 'transport': 'socket',\"\n \" 'type': 'inet',\"\ndiff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/precopy-tests.c\nindex a9381fa3bf..55ad77ef0d 100644\n--- a/tests/qtest/migration/precopy-tests.c\n+++ b/tests/qtest/migration/precopy-tests.c\n@@ -161,7 +161,7 @@ static void __test_precopy_rdma_plain(MigrateCommon *args, bool ipv6)\n **/\n g_autofree char *uri = g_strdup_printf(\"rdma:%s:29200\", buffer);\n \n- args->listen_uri = uri;\n+ args->uri = uri;\n \n test_precopy_common(args);\n }\n@@ -253,7 +253,7 @@ static void migrate_hook_end_fd(QTestState *from,\n \n static void test_precopy_fd_socket(char *name, MigrateCommon *args)\n {\n- args->listen_uri = \"fd:fd-mig\";\n+ args->uri = \"fd:fd-mig\";\n args->start_hook = migrate_hook_start_fd;\n args->end_hook = migrate_hook_end_fd;\n \n@@ -1026,7 +1026,7 @@ static void test_dirty_limit(char *name, MigrateCommon *args)\n args->start.hide_stderr = true;\n args->start.use_dirty_ring = true;\n \n- args->connect_uri = uri;\n+ args->uri = uri;\n \n /* Start src, dst vm */\n if (migrate_start(&from, &to, &args->start)) {\n@@ -1037,8 +1037,8 @@ static void test_dirty_limit(char *name, MigrateCommon *args)\n migrate_dirty_limit_wait_showup(from, dirtylimit_period, dirtylimit_value);\n \n /* Start migrate */\n- migrate_incoming_qmp(to, args->connect_uri, NULL, \"{}\");\n- migrate_qmp(from, to, args->connect_uri, NULL, \"{}\");\n+ migrate_incoming_qmp(to, args->uri, NULL, \"{}\");\n+ migrate_qmp(from, to, args->uri, NULL, \"{}\");\n \n /* Wait for dirty limit throttle begin */\n throttle_us_per_full = 0;\n@@ -1070,8 +1070,7 @@ static void test_dirty_limit(char *name, MigrateCommon *args)\n /* Assert dirty limit is not in service */\n g_assert_cmpint(throttle_us_per_full, ==, 0);\n \n- args->listen_uri = uri;\n- args->connect_uri = uri;\n+ args->uri = uri;\n \n args->start.only_target = true;\n args->start.use_dirty_ring = true;\n@@ -1082,8 +1081,8 @@ static void test_dirty_limit(char *name, MigrateCommon *args)\n }\n \n /* Start migrate */\n- migrate_incoming_qmp(to, args->listen_uri, NULL, \"{}\");\n- migrate_qmp(from, to, args->connect_uri, NULL, \"{}\");\n+ migrate_incoming_qmp(to, args->uri, NULL, \"{}\");\n+ migrate_qmp(from, to, args->uri, NULL, \"{}\");\n \n /* Wait for dirty limit throttle begin */\n throttle_us_per_full = 0;\ndiff --git a/tests/qtest/migration/tls-tests.c b/tests/qtest/migration/tls-tests.c\nindex f45f4c4b0c..827cc7bcf8 100644\n--- a/tests/qtest/migration/tls-tests.c\n+++ b/tests/qtest/migration/tls-tests.c\n@@ -436,7 +436,7 @@ static void test_precopy_unix_tls_x509_default_host(char *name,\n {\n g_autofree char *uri = g_strdup_printf(\"unix:%s/migsocket\", tmpfs);\n \n- args->listen_uri = uri;\n+ args->uri = uri;\n args->start_hook = migrate_hook_start_tls_x509_default_host;\n args->end_hook = migrate_hook_end_tls_x509;\n args->result = MIG_TEST_FAIL;\n", "prefixes": [ "v1", "15/15" ] }