From nobody Tue Nov 26 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1709722290; cv=pass; d=zohomail.com; s=zohoarc; b=QbVMy/wuM1YqrcF793vYFGhJCAt/ZxoBi5dEgiL0pfB1/qYD3Cbj0jvzmwarUtqFR2wUCEmJHr59f6cslzPoQ8aTFRCv1tc+PQ8/4Eggs010Mix9hUGbF9hzNOYh5vlyvejlhX4haFZA06EzAVyw8+yAgQCv56oaQJAAqa4i8K0= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709722290; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=AxfJsyoAaQGqnvSFQ0VUM51frhJpCCmnofKwbnNyH5Y=; b=HmSMKUUnkQjyhJHCcMwMMUvZcjn+iuWdpPM4GXsZPPSxzwGabYJ7w7WKue/u/lw38Qlfdacl+6DDTe5U7cD6ha1JwqIRTbp+b2mUbL8KDSOPWzu4LSx+AMD8JR5kIz0GP3qfUPHHETR9skWoap+2OzTfnIGNgCEA+/FxHmlGpS0= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709722290749294.0939419802944; Wed, 6 Mar 2024 02:51:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhoqs-00065x-PV; Wed, 06 Mar 2024 05:50:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhoqr-00062M-4E for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:21 -0500 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhoql-0000BP-GQ for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:20 -0500 Received: from pps.filterd (m0127840.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42601jJI011994; Wed, 6 Mar 2024 02:50:13 -0800 Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2041.outbound.protection.outlook.com [104.47.74.41]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3wm1avrphj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 02:50:13 -0800 (PST) Received: from SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) by CY8PR02MB9594.namprd02.prod.outlook.com (2603:10b6:930:79::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Wed, 6 Mar 2024 10:50:10 +0000 Received: from SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0]) by SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0%7]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 10:50:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= proofpoint20171006; bh=AxfJsyoAaQGqnvSFQ0VUM51frhJpCCmnofKwbnNyH 5Y=; b=d0I/nfFa+JsPjlA5fn2AAY1I0nyzRPoTfUlI617I2sD2/DA8cU0i1gWFi gp6Ky3jwBvkNG6o2FQR0MGRroMTxW1qxeQur3bvy2cyehxVGT2hCs0CXC8dh7hvg baO2KKJREbxnS5I/t/D7Krt6GG5uzh1D3a+vxeZdjaLrqXuKYOJZN/etNsJrS+cP h8HztU3YbPqpg2PbIsFnnmcdnTvdUKv4rv7h6Keeyvk1LwN9o1RRvPyCAJEgBLoW wYU5YDqbpo21NfCf6Z6N8Fr5qECVgcUY7eF7XfStNTMXjvUxT+nJk20qaiyzZzpF TRwub6VfX7GzNtEjJAFNoxiKOtsAw== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zy2h/s9AKVWtBo3OKEULbu7Ok4WNw0UZks43bfv4EI6uDZor+U/h4IgXVDKAB7kt49jow5sjQAeLrEvkmWYvJdfyYHkMy51ij3+Urbw1D/p8MBclIALK+Jwv46Zz3Eqs2H/9yV2jMvvhKWhs5PjF3JRlgERCAczjtE/BGe7gMEQlbdUI2PlePan2ZapslE+YgRwOviX8GPG5gW4lqfn5JeyRrkKgrbOmLX/ZtT51PTEi8SXhLV98ibO2OsrvUAKLpJu8oOHB4fMq/v/kv3+nV0Xtg/JAqywpSQF3QX2ukZcofGmktX1gA9Iv9KRNKUjQIPMPdsNEJaAm/1iognnmpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AxfJsyoAaQGqnvSFQ0VUM51frhJpCCmnofKwbnNyH5Y=; b=FevMCeS+IDAObPjIYD+6bhjNT7639McNrPv+eWsJHlkVMOsjv1ecnyLz+zKfdsZS8L/5XvW7nKIbAsbSrUoFA3cSGUu2qiOOqHZlHhzkj+em28oYrQgy/0rQAcKotxtgbHlPzCW66jtRGwpzhW0w8kq/B6TmtaOq5ZAWwYDyOcct8TmJYA/uldTVrycjKfSk1QAddr9EUhupT+WDQ4HylYaqFbutDhTIvk6JZLW9AJp92Km+Kd9wwX8PLBxGpOfftQjKaoUpTbws19vMOUaAR3ThxIWCYasrnIGXTh4JDfn/sJy3fuZqAezJZ5UK1zDDWhvH2JQJur2qNuhcM3z4JQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AxfJsyoAaQGqnvSFQ0VUM51frhJpCCmnofKwbnNyH5Y=; b=hbbGV2YywFr+2ZGxV4o0s0RXVMn/ff2UkJ7Xm0SzfJ2JYCOtr8dQ2OO6MmU2C1jmI4X/bWcQMcyhPcMJiccjrDmCqdnYk0zR9kE1mRHGlwp36ryFVHknwAUEycZ1SbQ/n1D3xdaWeL1QYtZURpss/qJtyJTSx8kdFBvuOyNmO/3mI5F1lSmoq5rCLV8YOlHaSdg9EjLfe/t6m4F9B7+FcM7kMI3NBAHfoKr9/ginqv13L9+yLJ6owRAJRXxrkhmrrd2P1zbl2LJ6k4kb+dPpON2PuAGNiCezGWQDbUL+Z4sGOCpmuB86+ydFSN6mdlag40uLoFo63qaX/n/MxT0jzw== From: Het Gala To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com, farosas@suse.de, Het Gala Subject: [PATCH v3 1/7] Add 'to' object into migrate_qmp() Date: Wed, 6 Mar 2024 10:49:52 +0000 Message-Id: <20240306104958.39857-2-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20240306104958.39857-1-het.gala@nutanix.com> References: <20240306104958.39857-1-het.gala@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR02MB9955:EE_|CY8PR02MB9594:EE_ X-MS-Office365-Filtering-Correlation-Id: ee264850-669e-4122-9243-08dc3dcb31ed x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yHQpmF5nMLWd5U5PxuWIlHPcJOE4GQAAqpXvQu9cK8dGWjAqR6XYpOQZ7y/Mpxbs9LPn2I6SjosEiSBPgHr/zzGYYGGvEE30gSsd4ic37YAC3FhG9CF5Rb/Nej0WsX6ABUg2zXdC4nYAvAWOdzajtMHQFcUlf4yiaX93l/h6XKa5FATMs3HTG0M43kxEWuC7rw77XEnL6KSSmmT50SQzqheg/FZI9ESJbYJY5M7m3FyPtxc2FHOHyNQTtiAoWRzqqxKTVcK1X78bvJUfyBN87+RX92hyaXUnJ62x/AIH2SFKYTzE4k0HW7M/nAB/aVv3Ztrs/Nu1JrlMCLTkxlfxp3QEOvkmrizlQ0j+Kzj489ruWKDSUOJiqMSmtF0boOJlXrvHl1k3lKefYUkWrejaigA98QJghQUUBqrXQ9UGsIrxq+pOJwPqOsb8utYGyU/bS7Uy2XFjlEx6xYrJblcVqPF/VbDGp0Vqs12nGsgVawyJpcMbcSrFkvL5gUGP0TAv+/8QGycdLWK/j9sCzGrHlw6rrRm00VaMLac3rw0e4HequxQ6qOQ7L1AOK5VVGhyO8n5DCNTHtU07JWE+4/HjakQsQRQmJ7QtnqGVbZvZ1M5UHIvwWSqts7x2uB2RsrYUQkWgEaQeUVfTA2pB9vmMzf3y/uSGYSd6fquo12iwyxgK+0S3zlY2JOUmEpQbj8xzp3OU0Qk0SxtQfdqrRacGOmeaEr8WcoPtx/nGJsLsRBU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR02MB9955.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?vEl1Z9pPwU7dh2RTY6EuFjxvMAZk69YGRl4tuR71nSqrcul6AUQ/Xob/qBOu?= =?us-ascii?Q?+eDr+J6f68f23zoAeaiQGr/y2iBHoJCadym+8wYQOYXsNutcF1T3oO0CXvUP?= =?us-ascii?Q?e5o7Uf5DO8ciLqgwPuPat4jO40hBK20gw6/rRUksKJEJ1xegX9nGgr8GOWdt?= =?us-ascii?Q?IwwsPaWli7M74acvPY/9l5YfUEqOy0XM+sbAkSuawG4bnLGaqJY8tWph2fB9?= =?us-ascii?Q?kVSIcu9ErOMD2yfrFLL8l7e0loHt/lqPsilGDwLzmqvXVWLVJNB+GtmhOrR3?= =?us-ascii?Q?5VzCVz8ldFdDdm/TINo5NxDf5jSJuO5c2/kL/d2Z2PIKxDuiS6b/fRO+p3sT?= =?us-ascii?Q?PhBpsaXT7KMgo0C9dLPEBGGwLtFGaMly5h57kftCzjKNIpxNWikxxJrXFauH?= =?us-ascii?Q?pir48x1coyaxEuJJl458CnfruG8kddEQgohMuR95QcXo5FRljQ9Z42zSHxrL?= =?us-ascii?Q?nbCO67GNYpCBaFVfEOJG1ZAoVIsd2IoN6TFmR0iA4iR9OPwYXa5KST7BMjIw?= =?us-ascii?Q?hxu/SgltCoHh+hxE0Ac+O/BM3xyZupWYakxwZwYjKUSv1FhsfQc14acwS60p?= =?us-ascii?Q?oHC1NoH7LXMfKPFNDtBjmdyHNwG4sY05WKDRIaCWpXVZ/617kasbLY9NjITM?= =?us-ascii?Q?ghS4WXiO0Kn5O++gTy7uradvpZH4y9gDufcBXCVGDeaHtlKswyKWuIja/YpV?= =?us-ascii?Q?IHAQwZyeJhK2eI7FDtDeM7urxJv1zJEyV2fspLISVjd2DH9crOPDoQBDIhJW?= =?us-ascii?Q?Wcg4dEEv7BfEWiDXtNVCl67RXNGA1xlzmS1wnttuXYLttoVtwebRo4XNF3/o?= =?us-ascii?Q?P+mKpiFfPLTpI9OP4hgXrCiyWgghauwNwD3EYI2IuEXG5XmpKPf5vCFA2vTF?= =?us-ascii?Q?usETkfSpFn9lvPnVikDHjxOq9sR9DAkLVH5LBQ2zdz6fKl43BAORC42kAJFN?= =?us-ascii?Q?UYlqV8F8H3eQcDiOD0eGK72NHA+NxDwEd6+Aks10o09TG+I1I/HsTxMFm5Hy?= =?us-ascii?Q?m5M6l1fw/j5th6tawqXAbRiUQE1AUAJRAn0yJKbhuwFoghzWJH23cv1MlYIO?= =?us-ascii?Q?kfKae+b8DM/K9nVijTwtcBpP7jnVRYBNpdH5PIruFR3qKuaDC5qY2f6EoSm2?= =?us-ascii?Q?+BeYDL0aiTPRDqW63/ZD/+EX44Xe7UWCD3bar19trs6rxY49NE16YPP8bBaT?= =?us-ascii?Q?xpS0GbDCTsUF0LiG6r2uKh9wv6+LJBP1bRnAqm/DuM8FbZ+ImtrEhug79wx7?= =?us-ascii?Q?YvNDuHOLUMbF9DTdftFdBP27MFRBPrN4oATrc/9dSbTFvGDC9JckfUvR9bXR?= =?us-ascii?Q?4byrvzswe5ZeC4tXUq5h9yKPSdcPAXfZa34WQksmlj4pOGv9H/ocxbhrlaK9?= =?us-ascii?Q?fsDbRAdYjg5q5lANNbhr9c5uXsLMeIj6GeeKNpSTE4x7vS1l6Bll7f8/+ZUm?= =?us-ascii?Q?2n4kFFfpnTt1my8nW4Ldod+4w1/DRsBiJb2nkH6jreDIaRT4ky6azL5Kn+px?= =?us-ascii?Q?u+7uS+WW0VsxPS8eO0I8ckfIjXkrZZ9Mbxuwet/2kwJlXNE+68duyhfOfS/c?= =?us-ascii?Q?t7ayOIE26+hJT4rvpI9RWLDhSclrMrp1hQljddkr?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee264850-669e-4122-9243-08dc3dcb31ed X-MS-Exchange-CrossTenant-AuthSource: SJ2PR02MB9955.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 10:50:10.6127 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tO6DNLa+MCTIhqcsJX8kzOglfwpSC8+p4Pbn2ReHbXcbThzcF3P6brbnI+iFlM3v6YNFjNIFGyqZDMPMjNgpCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR02MB9594 X-Proofpoint-GUID: o8Rm1OyLVJ9eLdPENrS8-MqYki_kQjhP X-Proofpoint-ORIG-GUID: o8Rm1OyLVJ9eLdPENrS8-MqYki_kQjhP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_06,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.151.68; envelope-from=het.gala@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.568, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1709722290964100001 Content-Type: text/plain; charset="utf-8" Add the 'to' object into migrate_qmp(), so we can use migrate_get_socket_address() inside migrate_qmp() to get the port value. This is not applied to other migrate_qmp* because they don't need the port. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 3 ++- tests/qtest/migration-helpers.h | 5 +++-- tests/qtest/migration-test.c | 28 ++++++++++++++-------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index e451dbdbed..b6206a04fb 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -68,7 +68,8 @@ void migrate_qmp_fail(QTestState *who, const char *uri, c= onst char *fmt, ...) * Arguments are built from @fmt... (formatted like * qobject_from_jsonf_nofail()) with "uri": @uri spliced in. */ -void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...) +void migrate_qmp(QTestState *who, QTestState *to, const char *uri, + const char *fmt, ...) { va_list ap; QDict *args; diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helper= s.h index 3bf7ded1b9..e16a34c796 100644 --- a/tests/qtest/migration-helpers.h +++ b/tests/qtest/migration-helpers.h @@ -25,8 +25,9 @@ typedef struct QTestMigrationState { bool migrate_watch_for_events(QTestState *who, const char *name, QDict *event, void *opaque); =20 -G_GNUC_PRINTF(3, 4) -void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...); +G_GNUC_PRINTF(4, 5) +void migrate_qmp(QTestState *who, QTestState *to, const char *uri, + const char *fmt, ...); =20 G_GNUC_PRINTF(3, 4) void migrate_incoming_qmp(QTestState *who, const char *uri, diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 83512bce85..f645ab26f2 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1350,7 +1350,7 @@ static int migrate_postcopy_prepare(QTestState **from= _ptr, wait_for_suspend(from, &src_state); =20 g_autofree char *uri =3D migrate_get_socket_address(to, "socket-addres= s"); - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -1500,7 +1500,7 @@ static void postcopy_recover_fail(QTestState *from, Q= TestState *to) g_assert_cmpint(ret, =3D=3D, 1); =20 migrate_recover(to, "fd:fd-mig"); - migrate_qmp(from, "fd:fd-mig", "{'resume': true}"); + migrate_qmp(from, to, "fd:fd-mig", "{'resume': true}"); =20 /* * Make sure both QEMU instances will go into RECOVER stage, then test @@ -1588,7 +1588,7 @@ static void test_postcopy_recovery_common(MigrateComm= on *args) * Try to rebuild the migration channel using the resume flag and * the newly created channel */ - migrate_qmp(from, uri, "{'resume': true}"); + migrate_qmp(from, to, uri, "{'resume': true}"); =20 /* Restore the postcopy bandwidth to unlimited */ migrate_set_parameter_int(from, "max-postcopy-bandwidth", 0); @@ -1669,7 +1669,7 @@ static void test_baddest(void) if (test_migrate_start(&from, &to, "tcp:127.0.0.1:0", &args)) { return; } - migrate_qmp(from, "tcp:127.0.0.1:0", "{}"); + migrate_qmp(from, to, "tcp:127.0.0.1:0", "{}"); wait_for_migration_fail(from, false); test_migrate_end(from, to, false); } @@ -1708,7 +1708,7 @@ static void test_analyze_script(void) uri =3D g_strdup_printf("exec:cat > %s", file); =20 migrate_ensure_converge(from); - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); wait_for_migration_complete(from); =20 pid =3D fork(); @@ -1777,7 +1777,7 @@ static void test_precopy_common(MigrateCommon *args) goto finish; } =20 - migrate_qmp(from, connect_uri, "{}"); + migrate_qmp(from, to, connect_uri, "{}"); =20 if (args->result !=3D MIG_TEST_SUCCEED) { bool allow_active =3D args->result =3D=3D MIG_TEST_FAIL; @@ -1873,7 +1873,7 @@ static void test_file_common(MigrateCommon *args, boo= l stop_src) goto finish; } =20 - migrate_qmp(from, connect_uri, "{}"); + migrate_qmp(from, to, connect_uri, "{}"); wait_for_migration_complete(from); =20 /* @@ -2029,7 +2029,7 @@ static void test_ignore_shared(void) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -2494,7 +2494,7 @@ static void do_test_validate_uuid(MigrateStart *args,= bool should_fail) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); =20 if (should_fail) { qtest_set_expected_status(to, EXIT_FAILURE); @@ -2597,7 +2597,7 @@ static void test_migrate_auto_converge(void) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); =20 /* Wait for throttling begins */ percentage =3D 0; @@ -2908,7 +2908,7 @@ static void test_multifd_tcp_cancel(void) =20 uri =3D migrate_get_socket_address(to, "socket-address"); =20 - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -2940,7 +2940,7 @@ static void test_multifd_tcp_cancel(void) =20 migrate_ensure_non_converge(from); =20 - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to2, uri, "{}"); =20 migrate_wait_for_dirty_mem(from, to2); =20 @@ -3273,7 +3273,7 @@ static void test_migrate_dirty_limit(void) migrate_dirty_limit_wait_showup(from, dirtylimit_period, dirtylimit_va= lue); =20 /* Start migrate */ - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); =20 /* Wait for dirty limit throttle begin */ throttle_us_per_full =3D 0; @@ -3314,7 +3314,7 @@ static void test_migrate_dirty_limit(void) } =20 /* Start migrate */ - migrate_qmp(from, uri, "{}"); + migrate_qmp(from, to, uri, "{}"); =20 /* Wait for dirty limit throttle begin */ throttle_us_per_full =3D 0; --=20 2.22.3 From nobody Tue Nov 26 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1709722297; cv=pass; d=zohomail.com; s=zohoarc; b=Tbyb+lX370sejCsabsOJjkR1tDrI6E2nUojKv7G3FMezEMqs6Vc0IXoqbW4iH+zIzuWQS/n5QX5uV5QvIbOUKABrPKLwsMbC3hxH01E1LBKAfXruwQZxiuFfH3x3FdSo4HEtYnP1dYDfAam+j+DbMsKKbfIU+aG++1LdThtNLXg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709722297; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9earbsqya7o7Pap8AYQ1MU3VmfxHwpI6bRfmuPK0DAk=; b=NQtJeuaN5AwVyvcD3nCYaj9n1Kh9U58vJCSY7A4DRvxcreJEUECmgmUoAzY5or0+ou/SiZzHmwFEZkMPZ0scuz6l+9j3rcBtNHa8xYfsuqMf7Z/hoUNeBlSEemrPjqkVzy2IB3B9L2FQwmo2FmRlWgiE3fRO7vy5Pg/hdGIDIYs= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170972229782169.25036339326516; Wed, 6 Mar 2024 02:51:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhoqt-00066y-61; Wed, 06 Mar 2024 05:50:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhoqr-00062Z-NE for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:21 -0500 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhoqp-0000Dk-G8 for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:21 -0500 Received: from pps.filterd (m0127839.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42601qBR004026; Wed, 6 Mar 2024 02:50:18 -0800 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3wm42hgg5s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 02:50:18 -0800 (PST) Received: from SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) by CY8PR02MB9594.namprd02.prod.outlook.com (2603:10b6:930:79::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Wed, 6 Mar 2024 10:50:16 +0000 Received: from SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0]) by SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0%7]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 10:50:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= proofpoint20171006; bh=9earbsqya7o7Pap8AYQ1MU3VmfxHwpI6bRfmuPK0D Ak=; b=uxZ9Wc6ehwka9SJaOM2jzcznpIXsKe/j9kIWKTZnvgFiQKN9Ao/mt+xsp Gpnhf0lhSdCGMPXh5fdsOEZgPvm/KSM+hFsTa4LLB7DA8Rj5e/sD9aw66vUP6Dbi 8wtXPN/utiqikhDTMzotUbLxNernr/O9+cOjcWhJ7KCRLxcpV77ajTIwJJKviukx oU03ruCNZL5llXvYcapSx4ZEf0bYObDUlV5LuAEyyvRmxEM3hP3MtWqGiusu2vCA IbbkRCS+opLXeXlpKgp/pltoCx4ZRGP88suQh0WGTJPfXrAFWCs6PiJAO9QxL/JW oDrT8OVKuZ+s/an4Ra2wajkOQ+LSQ== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VKM2Jgdpq6iQfABtAe+8Hym0+0dBH95FN6Jv3ess3P/1rW1ESCMb7lZsnnwSrd2RCsFxlhOGH9DS6i3ZfkgD+YN/z0kw72M5i/k4RoKqlx7CHWWGNRzRdI+eB5Q3I0Z0RvG9e2l1EXeyI5KWKjYCB9KBkdn3Ycw149l6nUl/JAM2BGiUOwnlezvc+F7KqI7LkCevnS/CGxptiiBUP/5IQBxKMMUnwA4xVldLLm6nIkCbcTwX9XnMCeyoslxc5AvArqCwuQrObSS0cELbzhtPWLBtZpwnU+k9tDQ0lWm2KaQR5VqSTtdFSPzMw2WdpHJmXJZC/YrJpUt+XxBqSrIvpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9earbsqya7o7Pap8AYQ1MU3VmfxHwpI6bRfmuPK0DAk=; b=P6e7UhMBwu3w4+VS7VYj4ratyRyFFHgpoPbbi15aDpRFRfvOjQ2iVlkzfgz81f7FB1WclOF+BBfJXQsikFcueFjpSFMDakEaKAMVs3RYpb1mhvDW5JC30bWajIp5ulvmNSs8KlPyVQ1juDopTrrM9WnTdB7E78f4xWNM4F1nPW16ixY+rXT4C7hJQX0UquZst6MDBGvRwMHX2glpE13raBPacE7/A1WjG0/iHrY+mdW2R3nzPPYHNbWpD2SDL7JnCVzSdDGIFcINvQYyy12FWtUeSswTMgBKnRzNxJwQjeC5MAkMIMnzwGfD8czcLJhAhMAmSTJS7GWkeWa7qgaGYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9earbsqya7o7Pap8AYQ1MU3VmfxHwpI6bRfmuPK0DAk=; b=SaHKQA6Ig9DJrlQ+3PlWdgW5EwM9tlgu6d6k5Q/SNCvp8I/9ldTNBYhmAhXOIFSOxc8B9k9pyqfJrIFbJzkxxnVU1JsqaQfUkLzPwpTP6JdbM4PXnxmANVoFZQPvOU6DRVU+pTne1dvkbkgqTLGKO3yKqEoOfkQq4lzXRLXujE9DRCI5+3qriYmzqJGrIRn4xnYU4XhX2mTLfyCZhrIOnFWy2gObqqwWpj8ixyEml1Ox28laUE2nr/63fndp+Rue6nYXx75ExGf8eYDKD2E8+1WncMBCODAAGrCpOSjUlvgn9OJzAa+XwA6JHrrNkrn7/SuXVb0Y6cddhcc+f/MieQ== From: Het Gala To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com, farosas@suse.de, Het Gala Subject: [PATCH v3 2/7] Replace connect_uri and move migrate_get_socket_address inside migrate_qmp Date: Wed, 6 Mar 2024 10:49:53 +0000 Message-Id: <20240306104958.39857-3-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20240306104958.39857-1-het.gala@nutanix.com> References: <20240306104958.39857-1-het.gala@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR02MB9955:EE_|CY8PR02MB9594:EE_ X-MS-Office365-Filtering-Correlation-Id: df63c096-d85f-4321-2112-08dc3dcb355a x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nNxFbCh0K3jmVce49FiXQqTYY+furPWVcjTVvFf/u3eUxiGfzkE2LCTcamFqcNqyJYz3A/jeC3v6k9FdaYzcFrgdzj6dGQfYwxYRvnf8xsjHLzEnLqvID3dMHnulcWWU+1SmxXdft0DkeMFqlD/gM3090VCkCyr3D8WzoE/bbQLoQ8I4v2W3r2Qh9fGqHfbWheaON/7r0Pw9d0YsxJYJ0pxAlw3MijmCr+TqkLM4m/d2aA9KJCP14ZmkVFVLkkWmU37ydSc6NU4aruUkRjobUpn6KYJWlf0VyE04gtn9dMUiz3n4EyIMmny1uvuDcEAxoAzPjPCCJ/ZSvCFlMMG65XrWTFWeASdjtIMpCXAZ5ERcQQh34Tg/QcxsbPW7VnB07tZXdN0iAOHFcPBxh8HUcO7Z2XKH4JIiaCdDmnSwnpE3AAVx8Y2/R5ITYCWzQw7XpQ58OecWFIW/y2P1QW818ze5G0WiXqcCxv8f8Zxt9jr8YAhzFSY1jbMos6dzhQGUo8MYpapmJmg6PHDx5OLxse17gbpZTqxC80aiDmXdDwa1ePbbn9Z6isKUfITRlVFb1TCYgX713UhPCEm4m9PObhrCC3Pz/qe4RtA/rmsZsU7gcWzSmnhDC7cQZe6NSK1TaJOA1A/tQdz4E4LU4P9GgxW5uBQwmIJl7kG9Yi7eHaHpnOPjPQV+34Lgap8GKUodpAeBKX2vT66Y0useL+7apV7ige2yktZY8Hoi4fOP2wk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR02MB9955.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?MCqQjg4Yc1xGPtkPTEGukn6wG2VSBNDgYrKbfXW1djzNRPM/gIkibXE9uP35?= =?us-ascii?Q?pYdQqHHGzWpdrvnz2pSqzlGoiptm/9fe6qC2HeO6ExOjRgXZdSR31WkQhI6k?= =?us-ascii?Q?UFY/+vK/FHqM1M8l4pO8NEPD8/rUySXPVLxE6IbZ9jBb2nyZNWNTFLDL1Ytb?= =?us-ascii?Q?JCDGJF3liTdH3sNatPeSnWnru9Ffe1/nDZP3k8wzgSxY/VDGv41eVviIINiP?= =?us-ascii?Q?0xz9HZutJrbFYtpSoIhHWjt62FhfJ+SnnYrnVLczJNxf/HKMYOJzjO+ywVtm?= =?us-ascii?Q?AOOA3Snp3xjd3fO4deVM0lKJlUtFhrTnLDtpQdRWXv02l75I09RZ1pCKWC08?= =?us-ascii?Q?hlRVShzUl3VrDOBgdnJ8uSj/Rec77FJjL+2P2WSBRPA/7VfiPWWgeXAvctW3?= =?us-ascii?Q?OUI4MZFRCz3/CGvqXYY/47XXVNQCNwhjlnWzPs/ymoKI0SlKZTaz9H9me/0C?= =?us-ascii?Q?KCBywi1kQcxbB+9QwVn5GG0X9jNg+sVYt1tw7gcn45TjAMnul3B/ez3r6Fgl?= =?us-ascii?Q?vg+AgIOpJsAc3XfbcIz6+7/f+VhQoABQwrohJWX9YylLuhlHCQmDUKsRqq8+?= =?us-ascii?Q?j2+kpxqUrzDvWhtfwTAuh1JBJmM9t4dwX93i7abK+FeMufgODJ+jCV+x56hQ?= =?us-ascii?Q?epD4bQ0whsyUJEMTg9HNRnMjbnoaii9z8X884gEpuwbGDugMRSbh5CEJWvYM?= =?us-ascii?Q?W52sjO+xxunVwMX1CxWtB+z/ayY+ZzM+LBZUrYfbyjRu0+mfpcYKxKPo1U7+?= =?us-ascii?Q?+C2tndmBfiabB0RUp8hs7AEWVxBLxCqO97AiovT3uqHNkqLHWfzg8fWBe9wj?= =?us-ascii?Q?LQiOiqwf0bo2yXvXVlpa0TXBPx083egz3UdysD77s9J9MKORBOte0gKVAiyG?= =?us-ascii?Q?P3TnIHNEDlBHVbW6VY+chb0XeDH+kjZc2t4DK1qQbXTOEtzZ1AT8dX1kUe0+?= =?us-ascii?Q?ChWGbq+ZQuW+n6REpLdXE5OakeZn1ANoZJO9gksGCoapYvrIHnXxRd7SZ1oU?= =?us-ascii?Q?9kzexhlj1K/VO4WQGbqoX1EUr11uPBVA7V1iYYfTcIniJydvUOrsjrTQuwZR?= =?us-ascii?Q?KeUaz4KlQO9QrnUv3d2pyeA6IAsz5axFbcrRD1YmNVJjqG/AxHzSqj/x4Plp?= =?us-ascii?Q?oVxU3oNQQCNMSk+K3FVAPHjPZs9FIQjtg6agqoRcpvRUuLmgTzC1jgKXiCcE?= =?us-ascii?Q?ugJLGsBz2fcaBHTjQXBClJVvWxZ7fFDvhkhsRXibfARIqGCKNwr4L4yvubA9?= =?us-ascii?Q?gT70e0X7Fml4vhufRnlyp0/RfH/TUtgPsIEWQeS1fC39oeSDUQPxnXE+770C?= =?us-ascii?Q?E0iUXFleJmQnm5cWVjs1h0y/v/NuEyFcw1CN23LxgJQ6F7O1PXLNCzEB5ePI?= =?us-ascii?Q?NtJ5cy7DEbBNZgQUsEU36vHjAAddDT4gKiraBA9PCKYk+jVzA4IT4BGGNtU5?= =?us-ascii?Q?ra4fG9Tdgi3AR3gKTEW5JDk0GD8NObezi9Z2RV4BoJaeuLQDenMceJS4OZLh?= =?us-ascii?Q?CXg/9km4hK7o9xuVyOxS7GigM6A9iiITNBsYhbOkwQomKj0L6SZezJTOJs+M?= =?us-ascii?Q?swsiZ3uH+308L+SoseInYiKiPsUJ/f2Dg/3I9ps2?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: df63c096-d85f-4321-2112-08dc3dcb355a X-MS-Exchange-CrossTenant-AuthSource: SJ2PR02MB9955.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 10:50:16.3549 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Paw6bUKweL/htiEnmKTiQ9AYYhIBBwb9t+su4VbkBADE8Yg4tRlRS0zGnsISscxsDPDoIDBpGOnMvObdGfrrcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR02MB9594 X-Proofpoint-ORIG-GUID: -NM7jSbbV6BsBkIwPrycaNVrZHoi9xo0 X-Proofpoint-GUID: -NM7jSbbV6BsBkIwPrycaNVrZHoi9xo0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_06,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.151.68; envelope-from=het.gala@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.568, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1709722299025100002 Content-Type: text/plain; charset="utf-8" Move the calls to migrate_get_socket_address() into migrate_qmp(). Get rid of connect_uri and replace it with args->connect_uri only because 'to' object will help to generate connect_uri with the correct port number. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 55 ++++++++++++++++++++++- tests/qtest/migration-test.c | 79 +++++---------------------------- 2 files changed, 64 insertions(+), 70 deletions(-) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index b6206a04fb..9af3c7d4d5 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -13,6 +13,10 @@ #include "qemu/osdep.h" #include "qemu/ctype.h" #include "qapi/qmp/qjson.h" +#include "qemu/sockets.h" +#include "qapi/qapi-visit-sockets.h" +#include "qapi/qobject-input-visitor.h" +#include "qapi/error.h" =20 #include "migration-helpers.h" =20 @@ -24,6 +28,51 @@ */ #define MIGRATION_STATUS_WAIT_TIMEOUT 120 =20 +static char *SocketAddress_to_str(SocketAddress *addr) +{ + switch (addr->type) { + case SOCKET_ADDRESS_TYPE_INET: + return g_strdup_printf("tcp:%s:%s", + addr->u.inet.host, + addr->u.inet.port); + case SOCKET_ADDRESS_TYPE_UNIX: + return g_strdup_printf("unix:%s", + addr->u.q_unix.path); + case SOCKET_ADDRESS_TYPE_FD: + return g_strdup_printf("fd:%s", addr->u.fd.str); + case SOCKET_ADDRESS_TYPE_VSOCK: + return g_strdup_printf("tcp:%s:%s", + addr->u.vsock.cid, + addr->u.vsock.port); + default: + return g_strdup("unknown address type"); + } +} + +static char * +migrate_get_socket_address(QTestState *who, const char *parameter) +{ + QDict *rsp; + char *result; + SocketAddressList *addrs; + Visitor *iv =3D NULL; + QObject *object; + + rsp =3D migrate_query(who); + object =3D qdict_get(rsp, parameter); + + iv =3D qobject_input_visitor_new(object); + visit_type_SocketAddressList(iv, NULL, &addrs, &error_abort); + visit_free(iv); + + /* we are only using a single address */ + result =3D SocketAddress_to_str(addrs->value); + + qapi_free_SocketAddressList(addrs); + qobject_unref(rsp); + return result; +} + bool migrate_watch_for_events(QTestState *who, const char *name, QDict *event, void *opaque) { @@ -73,13 +122,17 @@ void migrate_qmp(QTestState *who, QTestState *to, cons= t char *uri, { va_list ap; QDict *args; + g_autofree char *connect_uri =3D NULL; =20 va_start(ap, fmt); args =3D qdict_from_vjsonf_nofail(fmt, ap); va_end(ap); =20 g_assert(!qdict_haskey(args, "uri")); - qdict_put_str(args, "uri", uri); + if (!uri) { + connect_uri =3D migrate_get_socket_address(to, "socket-address"); + } + qdict_put_str(args, "uri", uri ? uri : connect_uri); =20 qtest_qmp_assert_success(who, "{ 'execute': 'migrate', 'arguments': %p}", a= rgs); diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index f645ab26f2..20b1dd031a 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -369,50 +369,6 @@ static void cleanup(const char *filename) unlink(path); } =20 -static char *SocketAddress_to_str(SocketAddress *addr) -{ - switch (addr->type) { - case SOCKET_ADDRESS_TYPE_INET: - return g_strdup_printf("tcp:%s:%s", - addr->u.inet.host, - addr->u.inet.port); - case SOCKET_ADDRESS_TYPE_UNIX: - return g_strdup_printf("unix:%s", - addr->u.q_unix.path); - case SOCKET_ADDRESS_TYPE_FD: - return g_strdup_printf("fd:%s", addr->u.fd.str); - case SOCKET_ADDRESS_TYPE_VSOCK: - return g_strdup_printf("tcp:%s:%s", - addr->u.vsock.cid, - addr->u.vsock.port); - default: - return g_strdup("unknown address type"); - } -} - -static char *migrate_get_socket_address(QTestState *who, const char *param= eter) -{ - QDict *rsp; - char *result; - SocketAddressList *addrs; - Visitor *iv =3D NULL; - QObject *object; - - rsp =3D migrate_query(who); - object =3D qdict_get(rsp, parameter); - - iv =3D qobject_input_visitor_new(object); - visit_type_SocketAddressList(iv, NULL, &addrs, &error_abort); - visit_free(iv); - - /* we are only using a single address */ - result =3D SocketAddress_to_str(addrs->value); - - qapi_free_SocketAddressList(addrs); - qobject_unref(rsp); - return result; -} - static long long migrate_get_parameter_int(QTestState *who, const char *parameter) { @@ -1349,8 +1305,7 @@ static int migrate_postcopy_prepare(QTestState **from= _ptr, wait_for_serial("src_serial"); wait_for_suspend(from, &src_state); =20 - g_autofree char *uri =3D migrate_get_socket_address(to, "socket-addres= s"); - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, NULL, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -1733,7 +1688,6 @@ static void test_precopy_common(MigrateCommon *args) { QTestState *from, *to; void *data_hook =3D NULL; - g_autofree char *connect_uri =3D NULL; =20 if (test_migrate_start(&from, &to, args->listen_uri, &args->start)) { return; @@ -1766,18 +1720,12 @@ static void test_precopy_common(MigrateCommon *args) } } =20 - if (!args->connect_uri) { - connect_uri =3D migrate_get_socket_address(to, "socket-address"); - } else { - connect_uri =3D g_strdup(args->connect_uri); - } - if (args->result =3D=3D MIG_TEST_QMP_ERROR) { - migrate_qmp_fail(from, connect_uri, "{}"); + migrate_qmp_fail(from, args->connect_uri, "{}"); goto finish; } =20 - migrate_qmp(from, to, connect_uri, "{}"); + migrate_qmp(from, to, args->connect_uri, "{}"); =20 if (args->result !=3D MIG_TEST_SUCCEED) { bool allow_active =3D args->result =3D=3D MIG_TEST_FAIL; @@ -1843,7 +1791,6 @@ static void test_file_common(MigrateCommon *args, boo= l stop_src) { QTestState *from, *to; void *data_hook =3D NULL; - g_autofree char *connect_uri =3D g_strdup(args->connect_uri); =20 if (test_migrate_start(&from, &to, args->listen_uri, &args->start)) { return; @@ -1869,18 +1816,18 @@ static void test_file_common(MigrateCommon *args, b= ool stop_src) } =20 if (args->result =3D=3D MIG_TEST_QMP_ERROR) { - migrate_qmp_fail(from, connect_uri, "{}"); + migrate_qmp_fail(from, args->connect_uri, "{}"); goto finish; } =20 - migrate_qmp(from, to, connect_uri, "{}"); + migrate_qmp(from, to, args->connect_uri, "{}"); wait_for_migration_complete(from); =20 /* * We need to wait for the source to finish before starting the * destination. */ - migrate_incoming_qmp(to, connect_uri, "{}"); + migrate_incoming_qmp(to, args->connect_uri, "{}"); wait_for_migration_complete(to); =20 if (stop_src) { @@ -2885,7 +2832,6 @@ static void test_multifd_tcp_cancel(void) .hide_stderr =3D true, }; QTestState *from, *to, *to2; - g_autofree char *uri =3D NULL; =20 if (test_migrate_start(&from, &to, "defer", &args)) { return; @@ -2906,9 +2852,7 @@ static void test_multifd_tcp_cancel(void) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - uri =3D migrate_get_socket_address(to, "socket-address"); - - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, NULL, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -2933,14 +2877,11 @@ static void test_multifd_tcp_cancel(void) /* Start incoming migration from the 1st socket */ migrate_incoming_qmp(to2, "tcp:127.0.0.1:0", "{}"); =20 - g_free(uri); - uri =3D migrate_get_socket_address(to2, "socket-address"); - wait_for_migration_status(from, "cancelled", NULL); =20 migrate_ensure_non_converge(from); =20 - migrate_qmp(from, to2, uri, "{}"); + migrate_qmp(from, to2, NULL, "{}"); =20 migrate_wait_for_dirty_mem(from, to2); =20 @@ -3273,7 +3214,7 @@ static void test_migrate_dirty_limit(void) migrate_dirty_limit_wait_showup(from, dirtylimit_period, dirtylimit_va= lue); =20 /* Start migrate */ - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, args.connect_uri, "{}"); =20 /* Wait for dirty limit throttle begin */ throttle_us_per_full =3D 0; @@ -3314,7 +3255,7 @@ static void test_migrate_dirty_limit(void) } =20 /* Start migrate */ - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, args.connect_uri, "{}"); =20 /* Wait for dirty limit throttle begin */ throttle_us_per_full =3D 0; --=20 2.22.3 From nobody Tue Nov 26 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1709722256; cv=pass; d=zohomail.com; s=zohoarc; b=B62QaNAAlgAZRWusVu8y9QO+AG1oQEpx5W5mJvqEzhmiRFM5N1SQYQ8Cz6sLgR5jLZLAsyTyOph9CiCZCm2xSlmmq6OMIlLPAeMUcvgFN8qxg886eboFUGBxwBkwFmXBq9lLJpox1sdrWlmpaf98T3xke1L5ju7FBdFb1tvGidU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709722256; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yoMfkDu+yUA0eslx10FViYndLCEpyXAFXAyMzf/zO3s=; b=Mr29RWJEMVi3kB2GQlQjAtLLIORFEq6hPw8x13Duny9wj2AzWubE8jxDGv1SxY+uIU+88WWjsIaTwj+1CwHdj6OcMOjYmbJi70I6aOPNweKxXEurOVfXK4n2CXi5FMKfChGo6GdtGSGVv8fZncB4hW9H6a5xQ+UMSEe91XGp1Ig= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709722256266379.2616448162463; Wed, 6 Mar 2024 02:50:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhor3-0006MX-Ho; Wed, 06 Mar 2024 05:50:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhor2-0006Fb-1D for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:32 -0500 Received: from mx0b-002c1b01.pphosted.com ([148.163.155.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhoqw-0000Ec-KP for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:31 -0500 Received: from pps.filterd (m0127844.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4269sGS0024911; Wed, 6 Mar 2024 02:50:23 -0800 Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3wm4h28hsg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 02:50:23 -0800 (PST) Received: from SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) by CY8PR02MB9594.namprd02.prod.outlook.com (2603:10b6:930:79::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Wed, 6 Mar 2024 10:50:21 +0000 Received: from SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0]) by SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0%7]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 10:50:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= proofpoint20171006; bh=yoMfkDu+yUA0eslx10FViYndLCEpyXAFXAyMzf/zO 3s=; b=zYElUYQBbHZg/uigjnkco2/ufFLTWLSoSPZnfVf5U/MX0y86sw4Km+TJt GOkkclXxcEyPH55ae3M3VAysHq4Of5JX5io94wc2W3il7Cum3GcuCMP6J93rxrOv vKcwRaTDLHKdgCa5nXOBEc+McKzeOvbi4r6dVEJ3jVJ6A//FSJmuZjcHOdVNH/Ov mWCciC63qb0Dxyf/ubqsKS6aBesu0Gvfw2i2eYaWb79QSIJIdf5S96RoKxteie8a 7ipsZ/LohavqBDm9jHUDOxMwwg+pHCO5jg6RBUf7RZ8SqUSGw0Ju1uQwP6f7GhPK OuGNL99a2GQU712o/7IGYFdQbcxVg== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bOuaXKX4OTHm+ZVtGwxeYPL8XsZ0qvMPKsbrmhFu8rInVpgSDXXQvEqGh82/XcCRs2gl0QqD8LaBXdH0NUICc+52qHfRMwZB8393E2piIIEOZVAdsqGt8rxKkDiXx1oRku4oT6rgjxgPwfInE/rATTftudMpmNHiTHCG73Z86sX13PHnlLiK3IsERmSkyzkoqZqe/RO5BLsNoPKWBMV9HJkpKNRvELNOE0SKXjdWOmdK3c7FJZKJjMKH7nr+qWgrcE2mt4nAksNqtx2gHk8C/pu1ZcMCzB8qM9Po1MoXqWbXUgo4GnaZzBgDSC49Q6cXvAqs0YSpznLokH2tWpd/7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yoMfkDu+yUA0eslx10FViYndLCEpyXAFXAyMzf/zO3s=; b=KWY7Zuo5sU6vS4EkW21U172HKqiRDmOo/6N1sVoHoRf9SbCPBnchXG4o39f49NrWb83JnGdVzfCRpM9NqoKxkKiY+E7h4tbC33rUkpLsotYukp/7V+NMLoKPOIJwQgQG2ztB+62uOHlv9F7i2HnGAWbXUkN8DduwpuhEL4zznIpoqbwvz7zjLF838Rtaqhp2c4/jW5ZX8K/2URisY4GTiccQMe1dQClZCJ5uuuuPUJKzCDnCdRAefINOfMh6imUcTJuhdIQ3nnEGMpNwXo/Cxx0BIXaQ8jdJ/nZWmsMJlvAAV/veDqhrgflRWYjp8TIrZufVQGCmc+88jmtxh712nQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yoMfkDu+yUA0eslx10FViYndLCEpyXAFXAyMzf/zO3s=; b=vbCNxJURjSKdmAi/5dgUFLjxQBj7ejH7k4Bk8FfnXaIOHp2JSknD8wNtRNULaiJUlc6pOZGtcYPZkulG3SVWJ5u+cATqKRUoPpAeGe1YOJvnr1iUPhwtnUVlRTxmQOgpUdqy3fxuwzTc/Qd/i7z/g8kzPJz3zW2CSU78owSbfHFqDVxTd+4AWP+dU7HawqB7G+Nl1B8MPVcEdqGijfwH72jBvBnSepAeg+BqnvOg+R9c0WYIcS77Fve+IFvv1K82Qz/2Lai+6yr9ALUQHOneirTG6QGDOWAFBz5gAqipWq6fAe9zhnBZBfXU5nRkSwkzr2HdFYgzxe2Dc71fEj9LHQ== From: Het Gala To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com, farosas@suse.de, Het Gala Subject: [PATCH v3 3/7] Add channels parameter in migrate_qmp_fail Date: Wed, 6 Mar 2024 10:49:54 +0000 Message-Id: <20240306104958.39857-4-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20240306104958.39857-1-het.gala@nutanix.com> References: <20240306104958.39857-1-het.gala@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR02MB9955:EE_|CY8PR02MB9594:EE_ X-MS-Office365-Filtering-Correlation-Id: cbce42fc-1c79-4e2e-6d87-08dc3dcb387f x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TR2gTUJfh3Um55q5ROHcbCX+PUI0RUj7xPicdnW3rhXx4uwq5lQid+JR4ZBryTslYqM0NlixPDv3o8yTQw3gnkz+Ct0ojOiXJykKofWBPIUI40MjzIKk82QOGnuSePQ93+kbgL3dzlL84ZVmCAmScT//LkI8q2hOrHmX6iQJ8U5xYGl6FXx7qcwE6GPvVuPUS15Q2d0ZR+RuKKgBJTJmoL1FdTeMSYxm4WA9+p/Tcr4uDN4ICr6aHK2JEKMtA5B4b+oP4xExFOZNvupdjtr3JHgclZARxeIc2wQlhUXIBKIubZe2MLAOtqys8MExUyl9ZjJ64MvG6jg9cLhEUFqh1HAXhlK95Vpd5in01QwH2Q4DjnQABfgGpHgMJ8GOmeK552CMpa3bu7nS3MR5YYfkykK7qL52hAOEeGr0aqqcCufUZO3z/HtTnNBjb7B/wLsHQkjNCIwHPaV98txz6ZlUhWXHJ1yPqdScurckVRANQBupE68qcXTdDXk8eTVGn+5bZAjzPiCvqAPX5luKL0PECE565+1fmFo1oLcr/Av6R14YWVGUONhcAb5E9UahXwzzmdAAnTz0ODXd4X6j+zxCwo3lzRK4TDGgtTtHwRpbooKRcCMfSjksy1vyoKFi0EdnNGiY6q5tOc35N2cvxPNU5miJ8+MlGNCc/C3JkCSK1IkLCMakrQFhlFmhX/PcEdpE8XPhp7E4U2Qo2Kx1Ml0IEbnXYQL2QSvqQ47VcOsOI4s= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR02MB9955.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pvmOiGqejqaIgJkL3Q/EdyMElWWo/pMFPEGxQwLlANta70jNsPvvvJWgNCWs?= =?us-ascii?Q?iAogMz8xBpal4+dfXRJXIPVEuKovL4t8Ta0ZKkvKpPaPcCtOg6z4YsFLunZ2?= =?us-ascii?Q?Vd/Ci9RxPwibQsNbOxXAwOC6L6PF2dWpA2ys5hLh9yuJAT/OmFV6RuImbhzc?= =?us-ascii?Q?yUTRL7nYwkg39XsoouqsgJyCrzLOOLiiDF9ZL7aWrCspVBVcNNaWboVh/I9h?= =?us-ascii?Q?bRA31R1k0NhdWcUPMA70yzpR86kpDWl4OZZx3wo96P27JXnsyDdTlHvEjjdA?= =?us-ascii?Q?XB5hgDcLSUT4AzQDMbLicyJxvQIPmTYJnimUkboHSb4ZAkeZ1Lte6HOCZ/Ui?= =?us-ascii?Q?7l9uBfdH2U6Nd6CCRIqdph8xby1gMnK13pjyXpH0sH2MLZC7ocHZADirPn0Q?= =?us-ascii?Q?SyeLgaMf0i6Kqhg9Rw9eqpJBQHooKw89PgNAq6y3GAaYK89ipocah88hVFBb?= =?us-ascii?Q?IAeud8akcEATezzDfzqsXAPURwLAT6XCX9afNZVT05H/aQXb5wcgqgNn9lgT?= =?us-ascii?Q?AHfP9qb9ZrvEUJ4Ck4y2avbZw/+8xvsDUcRxWb/sEIw47WRj7Xnm0womWGgu?= =?us-ascii?Q?el/7ovDeCayKbAfg4dBB0Q+hbTgJD/Ivqnqk5nEA0osg1uARk0OWTsxwWKtg?= =?us-ascii?Q?exsAcUEJuS+1i2u6lJNuq7FHDFRXIBfQCqZlzThzxbcHkL/Perp7ULqKzNeq?= =?us-ascii?Q?M9LEvssMJB68elWWxzEEMC6UHNQ/IhtfyJdpNJNG7bINdgZET999eAD5v1Sq?= =?us-ascii?Q?3dFIAyd0VAOK19tu0cDVwl7NTNV1DjjzYL5hcQLVOx4EQVhDicrSWowdRVpz?= =?us-ascii?Q?77zRi/CgSQVwPIgg3+jKcrT87NW3RradvMnOkxmWLREd5oCYDgwM7SN+2LNG?= =?us-ascii?Q?4GtCzTbAgxLGpuYEvPy5q03NerHMrYuuWPeB4FyI5sBF9D/GmKtFlzokbPTv?= =?us-ascii?Q?qyLZjI742Urnkn0WF2FFjtfN+Pjg/O0zNxl9TsFjYoEle2sQCT+VhQB0aUSp?= =?us-ascii?Q?XfvH5qfC/Y7rpM22B+jp5prRIAAfkjdsjZjP67o5J16ZJnSV6O1odqVaFhG4?= =?us-ascii?Q?ZRTuhcp8KLooOi+h/y10Yu9dTzLfsr9IxHt/1WfSdCFcM/b5QTRON/72wOLQ?= =?us-ascii?Q?tYFKISpR2EJ338OfntQKnd875pKIpdvpXxzdUik6Jp6L/1YSYL0iJ18lyS8P?= =?us-ascii?Q?2PgAIPj+SKvk34Oy9M9sNTUCk1Z061M5e+nEPdKCo1itsk9aOYBOD+q/Zrao?= =?us-ascii?Q?vI341MLjil4+zB+S5yl5Zpmbj+1gQV9WtVQYFO4TzTnbmUZWo2ZKBZUrjSaT?= =?us-ascii?Q?FfGfD0pzF9Kbmy8Fl1edQTfJH+o6IEUeA/FLQJPO7FJzQNtlTcFc8dK4Qpjm?= =?us-ascii?Q?UefCSklvjXZKnNjMua+LzNRbQZba2jNYxz2ilmCnvMnPiXCwI/gNurDKA++V?= =?us-ascii?Q?2+EAweqklfJpM0bR9AChHVnyj4Rs620x6siLa98H5zIH1ml2yHQBw131GrWh?= =?us-ascii?Q?0VgO61tsC340+ZVilNzLlCLmrgPkipqc8rMXz5F5atXlgPy3kB4NPjW2uNc9?= =?us-ascii?Q?O+F+9VueovP2wxVhc3XBCcJHlJs5H+/l+fTMYmuA?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbce42fc-1c79-4e2e-6d87-08dc3dcb387f X-MS-Exchange-CrossTenant-AuthSource: SJ2PR02MB9955.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 10:50:21.6668 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x+cw4SQMniqeF7X+dzOcOUfc4Ze5IuWrFphvU51azGIR3grqGV07AYuGHneTCLS+Nh/zm3rURgRBwP31TrZz9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR02MB9594 X-Proofpoint-ORIG-GUID: R1MZwq-s_ScPsNSrlmNFs4uOmq0trC4A X-Proofpoint-GUID: R1MZwq-s_ScPsNSrlmNFs4uOmq0trC4A X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_06,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.155.12; envelope-from=het.gala@nutanix.com; helo=mx0b-002c1b01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.568, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1709722256976100003 Content-Type: text/plain; charset="utf-8" Alter migrate_qmp_fail() to allow both uri and channels independently. For channels, convert string to a Dict. No dealing with migrate_get_socket_address() here because we will fail before starting the migration anyway. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 15 +++++++++++++-- tests/qtest/migration-helpers.h | 5 +++-- tests/qtest/migration-test.c | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index 9af3c7d4d5..478c1f259b 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -92,17 +92,28 @@ bool migrate_watch_for_events(QTestState *who, const ch= ar *name, return false; } =20 -void migrate_qmp_fail(QTestState *who, const char *uri, const char *fmt, .= ..) +void migrate_qmp_fail(QTestState *who, const char *uri, + const char *channels, const char *fmt, ...) { va_list ap; QDict *args, *err; + Error *error_abort =3D NULL; + QObject *channels_obj =3D NULL; =20 va_start(ap, fmt); args =3D qdict_from_vjsonf_nofail(fmt, ap); va_end(ap); =20 g_assert(!qdict_haskey(args, "uri")); - qdict_put_str(args, "uri", uri); + if (uri) { + qdict_put_str(args, "uri", uri); + } + + g_assert(!qdict_haskey(args, "channels")); + if (channels) { + channels_obj =3D qobject_from_json(channels, &error_abort); + qdict_put_obj(args, "channels", channels_obj); + } =20 err =3D qtest_qmp_assert_failure_ref( who, "{ 'execute': 'migrate', 'arguments': %p}", args); diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helper= s.h index e16a34c796..4e664148a5 100644 --- a/tests/qtest/migration-helpers.h +++ b/tests/qtest/migration-helpers.h @@ -33,8 +33,9 @@ G_GNUC_PRINTF(3, 4) void migrate_incoming_qmp(QTestState *who, const char *uri, const char *fmt, ...); =20 -G_GNUC_PRINTF(3, 4) -void migrate_qmp_fail(QTestState *who, const char *uri, const char *fmt, .= ..); +G_GNUC_PRINTF(4, 5) +void migrate_qmp_fail(QTestState *who, const char *uri, + const char *channels, const char *fmt, ...); =20 void migrate_set_capability(QTestState *who, const char *capability, bool value); diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 20b1dd031a..19bb93cb7d 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1721,7 +1721,7 @@ static void test_precopy_common(MigrateCommon *args) } =20 if (args->result =3D=3D MIG_TEST_QMP_ERROR) { - migrate_qmp_fail(from, args->connect_uri, "{}"); + migrate_qmp_fail(from, args->connect_uri, NULL, "{}"); goto finish; } =20 @@ -1816,7 +1816,7 @@ static void test_file_common(MigrateCommon *args, boo= l stop_src) } =20 if (args->result =3D=3D MIG_TEST_QMP_ERROR) { - migrate_qmp_fail(from, args->connect_uri, "{}"); + migrate_qmp_fail(from, args->connect_uri, NULL, "{}"); goto finish; } =20 --=20 2.22.3 From nobody Tue Nov 26 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1709722297; cv=pass; d=zohomail.com; s=zohoarc; b=Qa6iXzvVlIMhestbnX5HZMKkrOaJggPCq+5td9rrfiPu9VDZZNvKVv1g7Jggeii0hmnLGNkF1Jv3duWiwkDAnxLLAJ8T5/fiCbd2GOgUhJ3WuHGmX/iuIEPMJe83+JvRkYx9zJX+NPIUbGIXD0YRWnvZiuLK6ezRX5nC98ZG6aY= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709722297; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dje5I28MVmiUtcOmBA4JKLc1xSAQmSaRXgku8IbipS4=; b=LNZstkpXueU7yY7wbcAkdSeAWAPrXYqQFh9r90ggsEW3Q+/KCbrGWgzGh5/9cJ83kvViRNiYhzK64B1EnmgFhIgPkPV6OJ9NTz8yTBdPPzZdRFc/2Nw946O+XwqXXXSq62U/BHPJSutPeQ6Tgo4kJmR9tcBpq4wGI1nT6Vxkdmk= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709722297089725.9677642399288; Wed, 6 Mar 2024 02:51:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhor7-0006Pj-4S; Wed, 06 Mar 2024 05:50:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhor5-0006OY-0W for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:35 -0500 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhor3-0000F5-Bp for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:34 -0500 Received: from pps.filterd (m0127839.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42601p7S003955; Wed, 6 Mar 2024 02:50:32 -0800 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3wm42hgg65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 02:50:31 -0800 (PST) Received: from SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) by DS0PR02MB9617.namprd02.prod.outlook.com (2603:10b6:8:f3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.41; Wed, 6 Mar 2024 10:50:29 +0000 Received: from SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0]) by SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0%7]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 10:50:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= proofpoint20171006; bh=dje5I28MVmiUtcOmBA4JKLc1xSAQmSaRXgku8Ibip S4=; b=xQrAODXWnDIw5oH0SmrfC7Vy90E04ghU6SekYXAkqEWhAoHXTTDKevt+t YKzQgDxU21FWPK/oKjR3zlwDp89Agqt32W3ao1WpuTAVi28cBkukRnbWKPFffozg WhGsf4fiDi/1WtKm4gX8tXOlJTM0/p5su/1fcdNqk/u1TxhP+uniD/b4GgXKotz+ Vi1Tm5lAyUlL9sRM9GPH2+4hnbE0lPLMDy1F1PUA+NbmGySq5ESYqphQvF08koL/ Q27XtzmVwnAEjjkJvpv0dhDTRo7scbxIZZTP/GKb/396Npa5eDKj0IgvmLVOEVL0 4/nQPi8yClD8keQlm3EeJPXGKTG6w== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vn2/LuW/Dk4K1v7qQf2t9SIVkAR3UAMVQNCnv20PaY3lJweV6ZmKiUQLh4E48bgOrWInYc0AupT/bD8uAjddUOfGMK7upK0byfxY7B7Fzc45S/RnMJ+Co1hwXfGPZe0wVSjfaSt+XbQjlVux4mGMO8n8G9wWLi3LiCiwWul9sGowm4uVH277wdsNwxzh+8lN2uWhaC9JgWq7ttBwmLqxGP2r/Lhi0wii/XqmYbfKpDxIX9Gc0DV01LRxGo4FJSJl9a8LjdBtVx965OKvijeOZW3rnnj77GRmhvH1NN9HFCJn6SXFoGHqYeDTJGjlp5AS2ZzVacE8dnxdCQCyZ9jEzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dje5I28MVmiUtcOmBA4JKLc1xSAQmSaRXgku8IbipS4=; b=EFokf9Jahmm6zHVqBLRxhyVrcGR7nULY2aJIgw4g5+E37YAbhIi37OLbuFLQJo7UgdmDNbGRR1KZzwA4eqyVK+UVVvHAv46di1DkLqPb9Pcv/IoRUMORMwhDzwgjivM+V2fRk5cuYnMxEUt00sjPGZy1xMqERQj4JGsYh3gQYKcZq2r81JPA0LoyxTBWlvue8F6WsyZI7SSB1H9hTlFQR5QeSu2RY0O2S3Bc1i0xGu5+1g6edIFvTUAEZ47okSs+rQMVEq8QIojqomPnkudoSZholXUuLZxu3Y73bKYMpb+elzr1VMarJAJIsQj+p2RT3VdSQSU823K+WfCShmSFxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dje5I28MVmiUtcOmBA4JKLc1xSAQmSaRXgku8IbipS4=; b=YdyHqvruJfu8D+8A/iZrrtWYhGGcjWN+Mur+UegRWcCVJbbwutAVwgODWLcciE+h3mrC8SzL4HH6iPuNGa2xdM3uRIOEeaDCRTfzEGY4+C+FR0oF0+5z9qEltoWBUvV3ivKlQVeg9e2bkLNIPafsFEQ/4tURoOdMK/X23qjHoxtQkJHgofbYdJKeT9AEnodf8chH2+BaxDYw/67C3kRixOmQALdCAWL9xA7SCvXhBP1TlKb0uJtOGZe9OF9P4XNfOXaqhA/XRlwkFfkhew0uAPdPDnKtm/elwmt1LGVzYvXpXAOAAnP5lZa0vRmcuj+U5J7z+ZORd+K0ndx0ZYv1uQ== From: Het Gala To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com, farosas@suse.de, Het Gala Subject: [PATCH v3 4/7] Add migrate_set_ports into migrate_qmp to change migration port number Date: Wed, 6 Mar 2024 10:49:55 +0000 Message-Id: <20240306104958.39857-5-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20240306104958.39857-1-het.gala@nutanix.com> References: <20240306104958.39857-1-het.gala@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR02MB9955:EE_|DS0PR02MB9617:EE_ X-MS-Office365-Filtering-Correlation-Id: d9327cee-ba79-4c95-26b8-08dc3dcb3d4c x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QF0i9OqgjLC8ij6M5bu3Uhrs97sNHg9w768oXd/QbQ5xWsr9QDH8vndU4zc442xNzpjR1M62O1Hw25C9J94JFxcKwwYOCx8DVZ/vTE6b4Twij9F5vBitSy4E3ar0p7RHv1j8WEL3X0Tbcb6pHjb8bpWFLEziJpEtqgJUqIr3OuwFbTjQtPNJ2xjQ58WK/tt5ysb+zGjj0ZGyRqFFtdvliKbeQIuxxE88VL+MB43O4REnKxxNh510uzXrGS91p9ri/cyd3QrLzgevoB45Q7uRSQ0vd8YC/vqHXuwpXcZ+LIpdH1jm+dWZdnPDWIHgq5cpuVCvvN8y/auENT1BSGzeRX72fQR4avE/wfpqytygvwwtKj51aO2tCbPKuYKJBqXGIfK5PnFoQPxz1ll1RQiWb0lp3PZ4wYIo82C663FQ0GhODwDbKY02W6oonj3K+iL1OTEATSKrqgCKLGW6S/cH3vsn7sQTVXc7DZithG+7IlCkaL+aPMCN7sVQqcMMgFrwcMYpeJyZGJAkzKxZcFVUMabtN3OUtG9183N05KROQNZzAAduAVYJqsmE3M2LAPsR0Y+p8TQeONQmHtyW0yKUl8nuEW/MH19H36dsVO1+WvGXb/SQPeYrb8uCbvtth6ljWxWpV6I1QDj6t8nkR7xz5rQ1Jm2Vk75woAeWb6+oDDINjoSuLhwoqD4aKFDvLRoSFbhNk+rtC/OlQf26tOqV5zLBHhbrVsBFzfHib63PPeY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR02MB9955.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?WCQ6xAmrEPsSbSQ5C1n+ElicZ44ZBSS2REFMP9kM32oBIkD/p14GXRfGcs7c?= =?us-ascii?Q?YioaVmjKy0Kr4TBELaQdQ2Hx/kLEi/ygFjOW9XkHkZv8ZsIMtuonnoSBGwBa?= =?us-ascii?Q?bIWQEuVz4huuZgvy3/nwfiYEQikS64lJDg7euzwDws/ZbETbR8zjVcHBf61H?= =?us-ascii?Q?LA83XvNpy70oEkzvUVcj/XcofgzUAg6zd/T93752dBoDx1RX2VRlAWjs27oz?= =?us-ascii?Q?h87PT8ZMincy5VOut++zvJnUthdjSIaf1y0T4F1K9vSA7spIG2SAD5M5tVmu?= =?us-ascii?Q?rpK1+dQDCsgHCLayP2TIY5XgcMnLRKnMypBL6ZuupqfNDWviIDHR74Jix6ZR?= =?us-ascii?Q?MOzo+vak15Er/5ZcoDuptyimi8eTbJ+b/ktra+0h3zM7i3KhzRPumCPEy2Ye?= =?us-ascii?Q?djb3EeY61AY/ZG27QOZzyM6fyqvNpKicHqWSAL1Az8rlBVv9vF2iqYVLK4dK?= =?us-ascii?Q?/PVw3SoernjFP2ECOtm+/Cvwf0rmkYW58A/vTnW+hp74j3LxAdJxQ5qpIr7c?= =?us-ascii?Q?sEadQsoO9L7xWqZbBNiCbIbMLenZO8k7e33s2MUMW2/Yh1QVzZwPqBFmLvli?= =?us-ascii?Q?8Xjx4EG5Hl61MeFD1xT3mTTsO+ps9t3ApoSEOxaa2lv/acxPEARSJlfhoo0h?= =?us-ascii?Q?HmsYVk+Z3ZhTf4X8c6yLBXJ5EHMnZYC2HF50kwYfiXsXdiwuV4ViFZlSGz07?= =?us-ascii?Q?FdWvJ4YU6i2pAJ5dVRuOYoMNN37ccKLGo04RmXMYDQKrEvgHxE6QxMx9C6ha?= =?us-ascii?Q?i7ozwfjGFWFPBk1H3nuBXLUTMgQQFa6P18k1NByD0ctmfyFfbIOCEM0yagpm?= =?us-ascii?Q?F4OYCzxt1g63MFyl5yEMNP7bqT0RMvOQTqvlhu7WiXSqhhCevgU/NF/GqZJ4?= =?us-ascii?Q?X1lFqM+c/ftaKpDoY750fF9Pv6V+wf/qqGnAgL+l9mwDzuCr/MorRz66SgS0?= =?us-ascii?Q?aKu7E4UekJsrGkU+xLVt3+G/sCn5cK+v8LRb7Cn6fwh8XzSEkxAXLGZvnhWy?= =?us-ascii?Q?thnmMYvv9Zrzdgwc3tfhyAC2B/QRqTayPx9KAoGLhSkELRRjOBZMwffBf5QJ?= =?us-ascii?Q?u12DAudWm5QKYRBqYmBs5rZNfPnqDAJk0SbFyHejtc3IAf0tc5dOD6ha9j7u?= =?us-ascii?Q?lOEwEaD7ZkQDf3+v6RCh7sevkRsiUR7lUNh4nTDz5J72Vfzjxg4urdfNWPzr?= =?us-ascii?Q?wOxFwy7Z6UJBdqDpBjy8AaQNtI19K/BzDEk+LLhEtBebEqCW2z01OJ7qT+0o?= =?us-ascii?Q?ntg1xt9iBjWSaaljqePsU/LNYJeQEXGMaRU1rr5PbRk6j8gneJ6RnBggnTri?= =?us-ascii?Q?FgBcmZGdj6SDyeLkEP0dP3WmS8FjIeMw8agMmjGIIiimXd2hJJsfqjI1WHUO?= =?us-ascii?Q?O5O7rj7Z9GjqWHJYqc1z9Q3C0wQSCxP+1NxXSWJpXtfO1DHvwqTUYioi63jL?= =?us-ascii?Q?+IqBg1VeJTfrNXFL9ae0zYOrAOPMkGNtDkNW4hgiSJz+XV/JUQPn9APjXFLQ?= =?us-ascii?Q?oZTToOBMwsBtwE1ygq9xd1g8IkJ9plvLlKqDbEF/u0J1VKCz8wo4Uk+glTDM?= =?us-ascii?Q?K665rwtyfMRlXqFBwFKNNytW5lkZk9RIs3R/4d8EjH3ZzUxmFCSgHs1cVhCT?= =?us-ascii?Q?qA=3D=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9327cee-ba79-4c95-26b8-08dc3dcb3d4c X-MS-Exchange-CrossTenant-AuthSource: SJ2PR02MB9955.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 10:50:29.6865 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mC/TuukKc3X48mhFaB4K+9Q91k6/JsekSmlrDLeiIBQrcGCNMBmnbsNXXRzJOz+yRxrPAP2R9yEsWYRphlisnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR02MB9617 X-Proofpoint-ORIG-GUID: eAx_JguV4pgWF2ZiZp6nWW2Cnrho-elk X-Proofpoint-GUID: eAx_JguV4pgWF2ZiZp6nWW2Cnrho-elk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_06,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.151.68; envelope-from=het.gala@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.568, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1709722298970100001 Content-Type: text/plain; charset="utf-8" Add a migrate_set_ports() function that from each QDict, fills in the port in case it was 0 in the test. Handle a list of channels so we can add a negative test that passes more than one channel. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index 478c1f259b..df4978bf17 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -17,6 +17,8 @@ #include "qapi/qapi-visit-sockets.h" #include "qapi/qobject-input-visitor.h" #include "qapi/error.h" +#include "qapi/qmp/qlist.h" + =20 #include "migration-helpers.h" =20 @@ -73,6 +75,29 @@ migrate_get_socket_address(QTestState *who, const char *= parameter) return result; } =20 +static void migrate_set_ports(QTestState *to, QList *channelList) +{ + g_autofree char *addr =3D NULL; + g_autofree char *addr_port =3D NULL; + QListEntry *entry; + + addr =3D migrate_get_socket_address(to, "socket-address"); + addr_port =3D g_strsplit(addr, ":", 3)[2]; + + QLIST_FOREACH_ENTRY(channelList, entry) { + QDict *channel =3D qobject_to(QDict, qlist_entry_obj(entry)); + QObject *addr_obj =3D qdict_get(channel, "addr"); + + if (qobject_type(addr_obj) =3D=3D QTYPE_QDICT) { + QDict *addrdict =3D qobject_to(QDict, addr_obj); + if (qdict_haskey(addrdict, "port") && + (strcmp(qdict_get_str(addrdict, "port"), "0") =3D=3D 0)) { + qdict_put_str(addrdict, "port", addr_port); + } + } + } +} + bool migrate_watch_for_events(QTestState *who, const char *name, QDict *event, void *opaque) { @@ -143,6 +168,7 @@ void migrate_qmp(QTestState *who, QTestState *to, const= char *uri, if (!uri) { connect_uri =3D migrate_get_socket_address(to, "socket-address"); } + migrate_set_ports(to, NULL); qdict_put_str(args, "uri", uri ? uri : connect_uri); =20 qtest_qmp_assert_success(who, --=20 2.22.3 From nobody Tue Nov 26 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1709722292; cv=pass; d=zohomail.com; s=zohoarc; b=KTTRHRlTRPQZdZHF3X+4FW4Rkq0FFkvCIzrh+acikQn/ajQ2lfYw855M5djbLgoA249aRnEVQFUQCciWe0QNJiCi1TIQzUn8Kg+82WvOznrOOf8gZICmo41DNTVkRAYmpxmL9vw1edZPYrX+2CBl+SwurZC7nT1o1sFboqxq8/c= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709722292; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XsLx1tyDhrgXnDNxozer/65JyvH6vtmF85Szz8+hEaI=; b=K5JhP2zqz5YGvIMFY8vl4MYr+XC3kJF8V/ijoTMZoYCXTo2hQIAld4q9Zo7foMDGPH1xrk2gC/f+6l3YA1ng8+wiYhpK8HQFgNrlxs5jZ+6zQu0bABuV/rfb5WzPsYwuOGB/oSenq/Vj09yJXvLNDR50tz5KSJN+PXnYZBf6EUs= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170972229288538.42817217345021; Wed, 6 Mar 2024 02:51:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhorD-0006Si-37; Wed, 06 Mar 2024 05:50:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhorA-0006RP-6s for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:40 -0500 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhor8-0000FO-0G for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:39 -0500 Received: from pps.filterd (m0127840.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 426021Ot012934; Wed, 6 Mar 2024 02:50:36 -0800 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3wm1avrpj6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 02:50:36 -0800 (PST) Received: from SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) by DS0PR02MB9617.namprd02.prod.outlook.com (2603:10b6:8:f3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.41; Wed, 6 Mar 2024 10:50:34 +0000 Received: from SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0]) by SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0%7]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 10:50:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= proofpoint20171006; bh=XsLx1tyDhrgXnDNxozer/65JyvH6vtmF85Szz8+hE aI=; b=qLNhQFrAgYoCy6aJgmCryavW6U2kUYnk4htW6mAL9GOzFj8FSckD85bW+ 2RNhrSPhPtJkeURjsZJtL5irO1WFO2pX+gc8xm7mXvys9krGYAJJbn4udq2+Z7B7 yo46CtW00Vfdkm8xOTstgzw8AXvg7vmm/YGHY89JUGFpFEKSKt8MzaIDIpYKju5F mqoCkB7bqqgalpDX4/Zf6EwoYrakhTKrEs/dnFIVn46RLlgAjOdVDYCqrznDLHzH 2lPul6u6qJUhl/Ozr4yqi/ih3y5Mcfip5UOPyYec3tWhetfTwfEb04BPJK9jLENu 55iRND/IKFqXeKGrpmJIYpA5raZzg== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ioqkgIjYUJfpzdTWQXr1ZxwrD3M2xX68/tv0NcuYD6rbvuSJGmIomgBUCm8DgpizBKgHbDd1IQvmtvuVn6LDQN1visgRyyaUCvC0V0yeymIk0d6iSrM5MZ9DH/TD9wiCOMkE8Jvn3hZj6IGq853mufuDwow1QO2575TkWvDciHRa3KF1Z3jefNyZA09DMir6Fbiolyyqvgp3XTXEHdeEmJzUM1yRDVuipdHQGxw3z4dL4r+gu4OBwCb1VJ53wX+pigdFtnvz9hiP0JiNK3QisylPZDnC7/gOUDZQqAHvOvq+AI4PCg/PA2qgM3OcYNqpAivsNzc/15ZOGf7OOvCaAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XsLx1tyDhrgXnDNxozer/65JyvH6vtmF85Szz8+hEaI=; b=br1k3OfqOKic1i0mZ2jy+jDHp9UNVhKOMmIMFxkXHFPSE/IjmjkNCVzCEpOQkzJz6DE1NW8okBbutsvLff3eHhYyW0aOx22JaAbzOyw1yP/g1pOwg9ckm6WjYPav0iJJ8GLYJAd1Xckgn6f1euNKOoGYLyLZkqpuN+rh9bUq/i+UxgXwt20O6W6SPXha540jxNa51+iiaPCXQFdVsvdlxdQhUei5zk1bQVfRdFIyl7AzMyXQTP0LU0Ssn67S05nJ/0lu81fe4XRrT4v9ULmMEHRqZYgKJAHtUiAK2/AZE3m5+xi8vEi1wR2LIG1Ay07if49DXkjmG/fQ1r+61LRr7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XsLx1tyDhrgXnDNxozer/65JyvH6vtmF85Szz8+hEaI=; b=jx2lzIFOiICewq6e4NueSfZB/F692DnT1fY0UkP5ysZTxjYndU2Q8OocnCZbncuWARify9+A9sCUr3FFeEa9yRnQMPFcsv+nPMPsiDZB9U2pP2B8+twxipPv4an+Gvhra2gwWDpDtNAQugrv/NYMukAPqFB2upohVOrNdBuj4909bRO9pI6FX26YjNHN9+6CSWfxgJak4OxBgB+YfyB6b21PXfr9aqAGo+4RaNIY9mP+jm3rzXHjLIYs2FK0HU/8hoxeDVW0MQsF+rMCOBatWg7ILsrW70/FS15rjnnQwGR7rBMMaFQx0LA6909gWzFA68O5S7Vxy4TycAnSzEhh1A== From: Het Gala To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com, farosas@suse.de, Het Gala Subject: [PATCH v3 5/7] Add channels parameter in migrate_qmp Date: Wed, 6 Mar 2024 10:49:56 +0000 Message-Id: <20240306104958.39857-6-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20240306104958.39857-1-het.gala@nutanix.com> References: <20240306104958.39857-1-het.gala@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR02MB9955:EE_|DS0PR02MB9617:EE_ X-MS-Office365-Filtering-Correlation-Id: 38bf2206-ba33-4e4c-70d6-08dc3dcb401a x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TqNho2wVP8Nag04jUdeLv9smO+je+puPNYt9c34yL25y4TnTp+1bmo9rMk74nogRLESKa2yGEiPpRHPp+qq9OPx6V/CLaASDJCeO3GCE9FUVacPjvVWcjuf3giWvnAg9INAla9i7R3Qk1R+hLyUp/VoQXmXhcQ8FxKXIx+0C2cJsQZEXNzjorc+fm2g3rokd7V95PweoLGUHgOqmUocB4WYX2xVxa4v+6Jv0CjTsgtJawIH/jv1J2lOk5qc+FWli8JuwEpfqmxYMEJklNpPKLhxGudBd7+AXYFX4mz1amYPQ+faZD/goawJwht4nwdf3iE3GrxXK0NoAAUD79glNEfiTNVP4E5zNKpyfBy1LUvtT1O2bk9IMcwfVK3Mw906dJ03CptQS0ALQuhoGhXxNccbm99NXdNwcD8wvDuTJlJC6Vz3RtWKMdZQSUAtWkOjS4wCwUOeCZKvw3E0hMAUBjNYItcEYakIHsq9tUSS2Jr48ADOuJ7OF0/tVttIdytJ9R4zrKtPnC0kIq6JeXob1LMQ8E6hV8zGBWX2/pyn12rFiVxyOEIhcgOOxHmjhECem7b4wCHS9iy/ylZt8sVJhCQEtKKHX5OIYy/lUAfNTvVCXQsNJS66wpz5GXdjOJOnaAhs3rFO1GAWWaip5g1Qa8adrJqksFwrs+L88Rgf/gRA5Uh1XFTQdqgZ7TEt1kxuVNk1aE5smd3EFRE4lIvHTIzJZsdbPviMBB6+nTN3nsxw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR02MB9955.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?wpYHtyRH0G4JJpNW7o4B6VmsM4vdc5GCtJNHWVe1nDzsrFAHq27K4mLAmaH9?= =?us-ascii?Q?i4+pueUxat3oCvn1dLucIY2YdgsWsSBHAcejixtorQhrIlJMa49k845ErKKv?= =?us-ascii?Q?0Cx8z6rsZ4Vt8ZtudY7M0gEBrz9LeXhMb5uPaOGQzFC+Apix5nVNYVCh0DdM?= =?us-ascii?Q?iPj/0EwaYPQ8q4BKtHkR8cjkvQd2Mk9oq6rjRN7OSVPrV/ED39MF2v5GwlES?= =?us-ascii?Q?OIZ09FhAwpBU2fR3D3NC8Yxw8jWViyKrkFsIIvyQdx1Rhk5D09Wd9ldMVP9U?= =?us-ascii?Q?wCrcGsBqRAZOMO/ntfZqlCQTEC1NbDmGlcHChGSFeKAG9nS6YfWK1j08di5j?= =?us-ascii?Q?9KZzWw4ruQXHjdSlCZL0wMN+HK/o6aZCjzvRO7LgRxP2mqGvNeLMumknoBbs?= =?us-ascii?Q?f1laGgY3Rbic07Jv3NGXFxXSfrYDtGkLqjmAA036HFOjsw0m84zPAWR1DTg0?= =?us-ascii?Q?yaMVT/DFSICpSteKtiIApNXBPnDXfq/EgEuq/MXblU0jX/L2PbuKFIPQMiPt?= =?us-ascii?Q?XVHC+vLTno9/Iw55rSdgw2ueFjr019Lp6Q8f12hj9jqRQn2hMPYym0H+2NDO?= =?us-ascii?Q?PqLNZEXzwGwaEpUarMHA1jODSOmZ7cwriYkFMh8JuHKFgSBVUAUYUR+jFayK?= =?us-ascii?Q?oybKRTPYrh5yUKECn4Uc8n27rzb5IG2S7OvnGdOJAMfHi7NIyzGS4vARPk2u?= =?us-ascii?Q?UN8m7WR2aUlK0kU4En+CGvJ2kv6ZX7lfXmvjzpLLght+S5PP0622peR2w37d?= =?us-ascii?Q?uzdATGDgQOZpD75dehNty5ySGLsN4LjpPLKyIkAJGhHTXwgdH3le2ZYVk8wy?= =?us-ascii?Q?Si+ivAiO3Qcp5Go4vKops+Hhh7SDEAwKd7N615u6XVg9Z4JT31RXvEbgjo1B?= =?us-ascii?Q?V5MxnsrzxKodOAAAkuDeFcmsadiI/cepXZC2RXFl8dZ+UnqhfCmnTKiHc0DE?= =?us-ascii?Q?/z4enCcyZTRoeckGtfdQRcgp2IH64C9MiXKjtfAvQYxX2EJNi7CASfWCrl8y?= =?us-ascii?Q?m44SgcUoLswGB8YrFhuI8sLmjIPbgw+OLVUN+T2MbPpunI3kGT05JizXZWgl?= =?us-ascii?Q?SnjTlqMSXQmVL6A8OQoOWCtUSBug73163RAx4ORs5tqJjrbrrxs2Cj5Jx/TB?= =?us-ascii?Q?+xTiee72fN1Z6JsBqqRRf8cZRFJSPNd7GcpNuyOLi0IQg59Lbmh3I4ha5fPd?= =?us-ascii?Q?NoXFIeuxrWgflwAC+zmN5FXPsfpEng+h7qHCVqVkszE4dstGRDZSiVCNtPcl?= =?us-ascii?Q?PvK1wjRrbvXzRVMtR8PRCRQC9jbwyhsVLZUp7fK7Bq3kqU7RAqjOtTWOs9E7?= =?us-ascii?Q?dcWObOggTt3ac8Mt5OJ0r+YanvTsDosBuhzi2wsnoih5Ho32uZ3boUbJve5z?= =?us-ascii?Q?xtitukQdRZXAPnCxArTW4flzH4Hcs4Q0Tlqo+ojyjQ3h+A6nW6g8jPG4T2pE?= =?us-ascii?Q?OdvlXjvV8DJbT04e+hwHuS41sQK03gQll/SUrvNwtZAXgZUmBdx2J25AzNzX?= =?us-ascii?Q?7vKUfaaWqUC21/0Fz6M6RieK44ti2Sso9aiQ5qXQcGIvkvdjl9wF8RxWGa1D?= =?us-ascii?Q?Sai8bU3Ws+Bwow3s4pp6529y7IAB5Hx9wfTpDC1E?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38bf2206-ba33-4e4c-70d6-08dc3dcb401a X-MS-Exchange-CrossTenant-AuthSource: SJ2PR02MB9955.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 10:50:34.3915 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BCett0x+pkiL+L6ianpdSzvbkK5d0TEqRq45/YmmSSRzL2SBTBOWUc2e+AhLO4lPzYMg6gcAmZlGVnV2iNkfmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR02MB9617 X-Proofpoint-GUID: DCGL9oh9n074NTHcokIoVPYPwr20t8Bk X-Proofpoint-ORIG-GUID: DCGL9oh9n074NTHcokIoVPYPwr20t8Bk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_06,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.151.68; envelope-from=het.gala@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.568, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1709722294988100008 Content-Type: text/plain; charset="utf-8" Alter migrate_qmp() to allow use of channels parameter, but only fill the uri with correct port number if there are no channels. Here we don't want to allow the wrong cases of having both or none (ex: migrate_qmp_fail). Signed-off-by: Het Gala Suggested-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 20 +++++++++++++++----- tests/qtest/migration-helpers.h | 4 ++-- tests/qtest/migration-test.c | 28 ++++++++++++++-------------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index df4978bf17..0b891351a5 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -19,7 +19,6 @@ #include "qapi/error.h" #include "qapi/qmp/qlist.h" =20 - #include "migration-helpers.h" =20 /* @@ -154,10 +153,12 @@ void migrate_qmp_fail(QTestState *who, const char *ur= i, * qobject_from_jsonf_nofail()) with "uri": @uri spliced in. */ void migrate_qmp(QTestState *who, QTestState *to, const char *uri, - const char *fmt, ...) + const char *channels, const char *fmt, ...) { va_list ap; QDict *args; + Error *error_abort =3D NULL; + QObject *channels_obj =3D NULL; g_autofree char *connect_uri =3D NULL; =20 va_start(ap, fmt); @@ -165,11 +166,20 @@ void migrate_qmp(QTestState *who, QTestState *to, con= st char *uri, va_end(ap); =20 g_assert(!qdict_haskey(args, "uri")); - if (!uri) { + if (uri) { + qdict_put_str(args, "uri", uri); + } else if (!channels) { connect_uri =3D migrate_get_socket_address(to, "socket-address"); + qdict_put_str(args, "uri", connect_uri); + } + + g_assert(!qdict_haskey(args, "channels")); + if (channels) { + channels_obj =3D qobject_from_json(channels, &error_abort); + QList *channelList =3D qobject_to(QList, channels_obj); + migrate_set_ports(to, channelList); + qdict_put_obj(args, "channels", channels_obj); } - migrate_set_ports(to, NULL); - qdict_put_str(args, "uri", uri ? uri : connect_uri); =20 qtest_qmp_assert_success(who, "{ 'execute': 'migrate', 'arguments': %p}", a= rgs); diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helper= s.h index 4e664148a5..1339835698 100644 --- a/tests/qtest/migration-helpers.h +++ b/tests/qtest/migration-helpers.h @@ -25,9 +25,9 @@ typedef struct QTestMigrationState { bool migrate_watch_for_events(QTestState *who, const char *name, QDict *event, void *opaque); =20 -G_GNUC_PRINTF(4, 5) +G_GNUC_PRINTF(5, 6) void migrate_qmp(QTestState *who, QTestState *to, const char *uri, - const char *fmt, ...); + const char *channels, const char *fmt, ...); =20 G_GNUC_PRINTF(3, 4) void migrate_incoming_qmp(QTestState *who, const char *uri, diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 19bb93cb7d..f94fe713b2 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1305,7 +1305,7 @@ static int migrate_postcopy_prepare(QTestState **from= _ptr, wait_for_serial("src_serial"); wait_for_suspend(from, &src_state); =20 - migrate_qmp(from, to, NULL, "{}"); + migrate_qmp(from, to, NULL, NULL, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -1455,7 +1455,7 @@ static void postcopy_recover_fail(QTestState *from, Q= TestState *to) g_assert_cmpint(ret, =3D=3D, 1); =20 migrate_recover(to, "fd:fd-mig"); - migrate_qmp(from, to, "fd:fd-mig", "{'resume': true}"); + migrate_qmp(from, to, "fd:fd-mig", NULL, "{'resume': true}"); =20 /* * Make sure both QEMU instances will go into RECOVER stage, then test @@ -1543,7 +1543,7 @@ static void test_postcopy_recovery_common(MigrateComm= on *args) * Try to rebuild the migration channel using the resume flag and * the newly created channel */ - migrate_qmp(from, to, uri, "{'resume': true}"); + migrate_qmp(from, to, uri, NULL, "{'resume': true}"); =20 /* Restore the postcopy bandwidth to unlimited */ migrate_set_parameter_int(from, "max-postcopy-bandwidth", 0); @@ -1624,7 +1624,7 @@ static void test_baddest(void) if (test_migrate_start(&from, &to, "tcp:127.0.0.1:0", &args)) { return; } - migrate_qmp(from, to, "tcp:127.0.0.1:0", "{}"); + migrate_qmp(from, to, "tcp:127.0.0.1:0", NULL, "{}"); wait_for_migration_fail(from, false); test_migrate_end(from, to, false); } @@ -1663,7 +1663,7 @@ static void test_analyze_script(void) uri =3D g_strdup_printf("exec:cat > %s", file); =20 migrate_ensure_converge(from); - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, uri, NULL, "{}"); wait_for_migration_complete(from); =20 pid =3D fork(); @@ -1725,7 +1725,7 @@ static void test_precopy_common(MigrateCommon *args) goto finish; } =20 - migrate_qmp(from, to, args->connect_uri, "{}"); + migrate_qmp(from, to, args->connect_uri, NULL, "{}"); =20 if (args->result !=3D MIG_TEST_SUCCEED) { bool allow_active =3D args->result =3D=3D MIG_TEST_FAIL; @@ -1820,7 +1820,7 @@ static void test_file_common(MigrateCommon *args, boo= l stop_src) goto finish; } =20 - migrate_qmp(from, to, args->connect_uri, "{}"); + migrate_qmp(from, to, args->connect_uri, NULL, "{}"); wait_for_migration_complete(from); =20 /* @@ -1976,7 +1976,7 @@ static void test_ignore_shared(void) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, uri, NULL, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -2441,7 +2441,7 @@ static void do_test_validate_uuid(MigrateStart *args,= bool should_fail) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, uri, NULL, "{}"); =20 if (should_fail) { qtest_set_expected_status(to, EXIT_FAILURE); @@ -2544,7 +2544,7 @@ static void test_migrate_auto_converge(void) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - migrate_qmp(from, to, uri, "{}"); + migrate_qmp(from, to, uri, NULL, "{}"); =20 /* Wait for throttling begins */ percentage =3D 0; @@ -2852,7 +2852,7 @@ static void test_multifd_tcp_cancel(void) /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); =20 - migrate_qmp(from, to, NULL, "{}"); + migrate_qmp(from, to, NULL, NULL, "{}"); =20 migrate_wait_for_dirty_mem(from, to); =20 @@ -2881,7 +2881,7 @@ static void test_multifd_tcp_cancel(void) =20 migrate_ensure_non_converge(from); =20 - migrate_qmp(from, to2, NULL, "{}"); + migrate_qmp(from, to2, NULL, NULL, "{}"); =20 migrate_wait_for_dirty_mem(from, to2); =20 @@ -3214,7 +3214,7 @@ static void test_migrate_dirty_limit(void) migrate_dirty_limit_wait_showup(from, dirtylimit_period, dirtylimit_va= lue); =20 /* Start migrate */ - migrate_qmp(from, to, args.connect_uri, "{}"); + migrate_qmp(from, to, args.connect_uri, NULL, "{}"); =20 /* Wait for dirty limit throttle begin */ throttle_us_per_full =3D 0; @@ -3255,7 +3255,7 @@ static void test_migrate_dirty_limit(void) } =20 /* Start migrate */ - migrate_qmp(from, to, args.connect_uri, "{}"); + migrate_qmp(from, to, args.connect_uri, NULL, "{}"); =20 /* Wait for dirty limit throttle begin */ throttle_us_per_full =3D 0; --=20 2.22.3 From nobody Tue Nov 26 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1709722292; cv=pass; d=zohomail.com; s=zohoarc; b=XpgJBkQRM5vlDAupZVGn/yRU6/PDKCks+u2BX8lv0tZi/AVquPjLWgABPHzw/7uvKRLlO248IL/1BHWu88btUd4Z2vbdKf3j1e7DNVCsu7iMgbBhfThXwy5rJ5NZCvdEFgZsFZhxtwid1GHK21s39JZfYhKaWupv8cakHaiRE/4= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709722292; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=o2ws0Em9vr7PlgVGm38ILlY4cAvCIHtkLoLc6XZQ5us=; b=F+8kq6uksl/MD+0iteh0jnkA8uTEnd69gNZBRlumvWGqOXAwRnCuSE6sybIFDcLlwFRZoNnu1zve2AvpYyJLinbYuvIodNJvTdXPCGTobTLtKJu4npHI0Mz2ehbqThufCtPwSZ3drKDXDG+/ojEnkNxpnH2Oo2hhK755jS0VKO0= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709722292817151.97725319656115; Wed, 6 Mar 2024 02:51:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhorH-0006Xl-46; Wed, 06 Mar 2024 05:50:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhorG-0006X0-Bv for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:46 -0500 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhorB-0000Fk-Ns for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:45 -0500 Received: from pps.filterd (m0127840.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42601jJJ011994; Wed, 6 Mar 2024 02:50:40 -0800 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3wm1avrpjb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 02:50:40 -0800 (PST) Received: from SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) by DS0PR02MB9617.namprd02.prod.outlook.com (2603:10b6:8:f3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.41; Wed, 6 Mar 2024 10:50:38 +0000 Received: from SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0]) by SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0%7]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 10:50:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= proofpoint20171006; bh=o2ws0Em9vr7PlgVGm38ILlY4cAvCIHtkLoLc6XZQ5 us=; b=EvMmvUsxg2uT6D5cAQUZbgjnHMu5Op/N08CwLVBf9y/OhAnjhc1ABj6i6 BKhrR/ALAjTfOzNbBSsYH2nEMFyrUx853JfrzDeMSRKt7PObynalBTfafeWN/YyT m9J8c4JKU3iO6jlHNvrE1zyTbpcAkoz6dEqvOgCZwhmpEYT02+VSFoVaVGXadXMm YAch2fU1Zx2md9MebQ5HvKlxRidr1BbyXu77vFIn8w3MeSQd79ARaEWUca8HAM2/ AJolSB6z5bbuU98Fi4GcF+QG2bTU1kcuw+1K486OG8v4nuyx0eoxhvac7sG0+eVh 4LzNEeMTb3f74rGw03UdrbrHZqK0g== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GYGfZN+Y+/YCMG+/bq4hF26leLvdARq8FT5FE7rBIxygviUZ8T1O2otHHJjc4+zY8wWbpD7sTZgbeu4bfyRTuSCONBDDYbit4EDW8A+ZlcLaicDwmQgjLX9oP4fq0RPpecxtjgOTIaj4tNnszGjC7fv0vtxPz0DBL+xW7LJ+HycD7NW7gZTlZOs626FT0kN1uCRqzxfiTR6yZFOOnktWOmAB/4GDmfcDzZOCe4zI8bRBHPoC92zajsBffoxEg1h4hn30lxh65eKqHyV3jJcWYIrsTOwQlk20WWRNPaLR/Ma4eDU2Aw6dCO0VzniM2ULVUlsAKqU7UOlMMIFI/HjBFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o2ws0Em9vr7PlgVGm38ILlY4cAvCIHtkLoLc6XZQ5us=; b=F+cJL/EG0BGUHcpncSIaSiOTs08hz6de+o4zAwJ3K/U1mSQ6f6bc5HMxOlPAiNuIaTATSukrRDw52cddFiYD9sp+XBt8lPYPX3zDvBG7gEwLOvrqYPlmHA4WPVfzVEl+wvzsNpO/W8FqF7VZK6lfLGAdMNkx6vxAXaSEElD5AFqKHD3JAzWEPAek9b4dY9yFKNHYsS21GB4W1IWlxqvCq64tlnXv7XtmvFXCbYMaEcO7npX3Ayl6jMasWYFVu/JpGqpGWJU6PuCndV5sf8oS3OHpjv3wd/DeD86pcrJSmSq6up7DOscpG4519LL1xpqDFHAryk0+WDbEfN7BfcWd5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o2ws0Em9vr7PlgVGm38ILlY4cAvCIHtkLoLc6XZQ5us=; b=Kr87qYhqZZt/oN4VjbazU9JPq2M/Iu8XOfSLjA1fWVSHunskEqp6PCSsYiVfld2rQiVXtX24hpudoZv9ba4ubOv/9VxGdeqvfrYQvdLCsByssq+et93E6hkNGavk0gi6SJasYtJEc0FQfBg7bAwvckgGBShLCu2yO1j8XBTLjA6p0u/9/dJeTXmEWtgL+BygUNunMguaru4rG3PYULR5KhBY/sZYWNDX09KdRY5xwDrZxdGVlzIqb4ddDha7II7o1fVbJKTJvRJn+fzNLJSZSZFSPHrBQqkP4BU2uM6w/vPE2F+w6AW+gGCWIwC8zlfVFXc/RIV7ht/+c2HgLqSQfg== From: Het Gala To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com, farosas@suse.de, Het Gala Subject: [PATCH v3 6/7] Add multifd_tcp_plain test using list of channels instead of uri Date: Wed, 6 Mar 2024 10:49:57 +0000 Message-Id: <20240306104958.39857-7-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20240306104958.39857-1-het.gala@nutanix.com> References: <20240306104958.39857-1-het.gala@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR02MB9955:EE_|DS0PR02MB9617:EE_ X-MS-Office365-Filtering-Correlation-Id: 78a06782-5b2a-4ad7-f3d1-08dc3dcb426e x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HmdGoAIUDHf+fyRulz1fUaT7sw3yVboEzfyaQrUT+8rnesJr67qj4/qvekAYcXfAWf17ClyRqxQgecb72vCWswtPoWemwaBjj+TF8FGdf7RkjdSHtsNAdeiC4F5y1/D6OQiMKdNT5W4g0YeF8yVGEE7NdQ5uJv6Sry3mU60xPUiwrwXAx/vHBznVxzFz1LNG+qtRtnq4pCYEpUwOTjCC/WmS/HQHsqIHLvj7LX+Ao7bqPrDig0etqwonm6afgM2tFfjGelQtQ/wZ6qKQNCUYDeo5FEQFQm5fBhyIK6S2W0NjUWpt9UGvFVzUYko5A1I8N+doZWihpSQ9qG7F5BnMfQ/gBttZL4h7/NlNX2hVoVGxMhFUQJBvVLD2qGFgBtHrUIyYZW3TiZFcEUefu+wc9gjmN/OvXEFZNn3xJw24FzoyUAjFnH2xt0LJgGA1ZJ8rOBqPPAVjyiB2C4Y5qA+GqxNxG1EfAUtYEhSJ884wn5JREIblr+OPZvNdHYXzOg8J5MDokbnBApknLr2BkEHtORe8iPZ95a2VBCuUeLfha7k+NaVFdFbwPsWr2TM/l/UDIZDEIzyhAX9iTBnz2bBE9znIropK6xdrD1V2kDmgrMA6aUUQMjHSj9GQCWFseTHSKxN7OdTe09U/NQaBQ5WbzydcK54NB4E5MEI0W0QWm/o5MZmnKx5qYTSBQrM9MMOqFsLzMbTzvXwkvmxVrKmA+UN3KRQ5L8usULo4a23MfJo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR02MB9955.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?3hyP8EdkrMvYsz9OZH6qPcOKHiWSb6wKDkHjJvboA3HSCcqgVkJvYXWKhj7u?= =?us-ascii?Q?LEG2LpK/Az0mcQ2qKbu3W1mX1TQHq5RhbhtxICnOL6AO+5za9s11A31mKhMu?= =?us-ascii?Q?If2HCmJ0OOQaX/ir9mB617T4nWUC1/fbOWxyMZnKQJxlAc65uPquyZbeDLNC?= =?us-ascii?Q?GsickxtbzUptwWQw/4+eyPccw0Kbr1I22ofvYf5eWrXpzwKWcpsV/vN8raSL?= =?us-ascii?Q?VTEQhm5XHU3PXcO27IdrJTTevJXzSLFPtWoDonP5mT4vs32QGyP1ZouhoAZJ?= =?us-ascii?Q?2of/qQ58uXdo139tbr5p5Q6F6axODzr8Lehp+f30PtB70+plOjIYLf6NAXC+?= =?us-ascii?Q?fEyRKJcrtpNV139hpkp7U0PSQywyFRow2W3fJkBKspqzyp9Or6jh9gKQIuRk?= =?us-ascii?Q?mrsGn7pymC8dSCcmS5s0VlBN+VgWevjUcTpDiD8pxeucOCRwaOr4ycXLz5Yn?= =?us-ascii?Q?owGver6yhM6MkTfPAZHAiqrnxP3jztp84MhVNOgBUtI/NHjyCC9jhd81FWV8?= =?us-ascii?Q?QtJAHhYAA7VF0doW8eTNwlk8INzPxYNH2fg6HyB2an/fZ5aXEHBWvKGHyCgh?= =?us-ascii?Q?0Ln7PkwBYYCnFhpjgw9VwbfPkKixFY7p4yXEf5YpgP915KWs0pRMaTEucqOU?= =?us-ascii?Q?kW3wb+j6D0O7hr6CIb+sxFNoi8QxugfCTcGNfCXsa7plWvAMyUX1ydq7ljAR?= =?us-ascii?Q?OX3lojCVimPEILMCoYqXRsw/h9WUbbps6X7icao7fc59UdHiAMVjo3ANaow8?= =?us-ascii?Q?x4j4UtIrza1qiLdkPceC9ox/WvueUQJm2DvR3kD3Po+V304Tn/l1ffV8uHop?= =?us-ascii?Q?0DtDvVKzcuklzpugPHyw2EqRc9U1me1piDAeYYSaw2pp2XnEOIcfZ6NJZ1W2?= =?us-ascii?Q?cfE0Ndi7KSLqwQTmdRfVbg+UJU6TZZkQHjPH3NpcI0d8Vy67Y6PW4IWymZaO?= =?us-ascii?Q?dAGbbRadtmZl5wYqXh9bM50QgLMWQ6GeO7CSK4iugsyfFZ/qWvMdrBhAFsTr?= =?us-ascii?Q?fRL6/SSaXCpcYo8aWOkuLd2lH9CQ/O6NzDCByfpkcUA0M9BXZndgiQGHkTLC?= =?us-ascii?Q?pSnqlL/DJT9e35rZc2qSONVQJWbxAtGswoa4kb/0z9BMGVhiOZu+2KJK7Gz3?= =?us-ascii?Q?2vifu3f3+fDtyNR0ajvkwcc8UvN+6DtQN+fO5+O6UKEGAnyc9gYrjwvSjRGI?= =?us-ascii?Q?AHZwu08NhY74EwwR2SdYe55+VkKkdbxZiax1Tzkpy5TpUwDlioIn5g1pgywi?= =?us-ascii?Q?PdUIl/I8ISH3EiPf48Qx1/AJT7eKEJ+HRvbep/RM0MLlO1dxCR48hO1Fv5tR?= =?us-ascii?Q?M5Kct2D90z8uRLAmKAiONcohXO5AYo7aRSKQtzaJRC0TnjjGw5I3qoiKQUG7?= =?us-ascii?Q?SHcAaHhdeVxkC1ZBmqK0S82mHmXBUXDZwbyLnyjkQoZfn6TdRK3jkGLw1m6N?= =?us-ascii?Q?KGoNz6M9/D9CPtKjItbT/BP+j0zsSNXBHOkBb4AbqpIB0WOAEVPfG5oDtV/O?= =?us-ascii?Q?s90CC7/RhVaGIC7eCVqNHoBrAKnKvsNRkqs94cr/c7fN0JHAB46rb+5q7QfB?= =?us-ascii?Q?dNRoacTVrp8oK0orP+f0ncW5Z3BHUqSG23OKq2Ky?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78a06782-5b2a-4ad7-f3d1-08dc3dcb426e X-MS-Exchange-CrossTenant-AuthSource: SJ2PR02MB9955.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 10:50:38.3098 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WdM9YHq4jrI4O5wJb4EJGM9UE7OJJZKopVLyQM5bK/0rUXojIZAaFT6foo9k8s7ITRG2wFtia2lwsMDfe2VH6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR02MB9617 X-Proofpoint-GUID: RlcIS5cMG0JBZpiiXta_r85SETBAnl9c X-Proofpoint-ORIG-GUID: RlcIS5cMG0JBZpiiXta_r85SETBAnl9c X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_06,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.151.68; envelope-from=het.gala@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.568, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1709722294961100006 Content-Type: text/plain; charset="utf-8" Add a positive test to check multifd live migration but this time using list of channels (restricted to 1) as the starting point instead of simple uri string. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas --- tests/qtest/migration-test.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index f94fe713b2..05e5f3ebe5 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -659,6 +659,12 @@ typedef struct { */ const char *connect_uri; =20 + /* + * Optional: the JSON formatted list of URIs for the src + * QEMU to connect to + */ + const char *connect_channels; + /* Optional: callback to run at start to set migration parameters */ TestMigrateStartHook start_hook; /* Optional: callback to run at finish to cleanup */ @@ -2623,7 +2629,7 @@ test_migrate_precopy_tcp_multifd_zstd_start(QTestStat= e *from, } #endif /* CONFIG_ZSTD */ =20 -static void test_multifd_tcp_none(void) +static void test_multifd_tcp_uri_none(void) { MigrateCommon args =3D { .listen_uri =3D "defer", @@ -2638,6 +2644,21 @@ static void test_multifd_tcp_none(void) test_precopy_common(&args); } =20 +static void test_multifd_tcp_channels_none(void) +{ + MigrateCommon args =3D { + .listen_uri =3D "defer", + .start_hook =3D test_migrate_precopy_tcp_multifd_start, + .live =3D true, + .connect_channels =3D "[ { 'channel-type': 'main'," + " 'addr': { 'transport': 'socket'," + " 'type': 'inet'," + " 'host': '127.0.0.1'," + " 'port': '0' } } ]", + }; + test_precopy_common(&args); +} + static void test_multifd_tcp_zlib(void) { MigrateCommon args =3D { @@ -3531,8 +3552,10 @@ int main(int argc, char **argv) test_migrate_dirty_limit); } } - migration_test_add("/migration/multifd/tcp/plain/none", - test_multifd_tcp_none); + migration_test_add("/migration/multifd/tcp/uri/plain/none", + test_multifd_tcp_uri_none); + migration_test_add("/migration/multifd/tcp/channels/plain/none", + test_multifd_tcp_channels_none); migration_test_add("/migration/multifd/tcp/plain/cancel", test_multifd_tcp_cancel); migration_test_add("/migration/multifd/tcp/plain/zlib", --=20 2.22.3 From nobody Tue Nov 26 04:14:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass(p=none dis=none) header.from=nutanix.com ARC-Seal: i=2; a=rsa-sha256; t=1709722301; cv=pass; d=zohomail.com; s=zohoarc; b=hw+tvAK77ifCAOGn1i/pH124wnIqFW0mguirpDGwOZG+Dq1gvbrSGZ/+1A9ml9JAz11GR0hTh9OK7zEY5rmtgo/YfbEXot9Xcf/UIk0sUOz77KvDll5dDFP5OL3BNrM7sWaHfO1rRU7me/ThoiHy2apMcMTSNo5DwccH7RajO8w= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709722301; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sXbQ2lVahxyj5wDXR/Rtk25By6lJAHCC9qGuKtZYU+8=; b=PEcx8q0GQnVPp1Zawct5GMJaMgbOvFQnak7fIaR/cDmWwd0GIKfwUeRbR7eTtNjJFtsCMqEOSWZUvN3SrUVkgXFfTjWnhESQKT10YHe36GA7HJfEnPypmxLVvVSEeuX/ro41CNvqj5d5kbj5YhGGPt217Quw4odSWkuLbnq5n1w= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nutanix.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709722301818983.2219298661645; Wed, 6 Mar 2024 02:51:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhorN-0006jE-A0; Wed, 06 Mar 2024 05:50:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhorL-0006c2-16 for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:51 -0500 Received: from mx0b-002c1b01.pphosted.com ([148.163.155.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhorG-0000GC-DU for qemu-devel@nongnu.org; Wed, 06 Mar 2024 05:50:48 -0500 Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4269IsHs002777; Wed, 6 Mar 2024 02:50:45 -0800 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3wm2hb8h6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Mar 2024 02:50:45 -0800 (PST) Received: from SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) by DS0PR02MB9617.namprd02.prod.outlook.com (2603:10b6:8:f3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.41; Wed, 6 Mar 2024 10:50:43 +0000 Received: from SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0]) by SJ2PR02MB9955.namprd02.prod.outlook.com ([fe80::225c:2edd:87e:7cf0%7]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 10:50:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= proofpoint20171006; bh=sXbQ2lVahxyj5wDXR/Rtk25By6lJAHCC9qGuKtZYU +8=; b=T/9bHKC3pKe7rmOrEv+odQeoi80Y8GHyBIZrdBrQX4mg1iXs0ZZI3FjnH 9KHneBgyLNM/zwYhGW0KFzOxlN1WeNuh5Ch+cTlDGovVDdAt6yuRwDadiz5Ibpf4 UEM9GQcJzOE/PbI8dG2hqLakCteirkDRL0rnfD29n7oi4R3TO3QCdnnU5SG9JJ28 Grbc3fz/Kcs/lk7HBqE9lT7w7j844jZug6NgyzLoiSwMiPOU5zeUX3E9OqRFDHzC TGgoh6Nfailr+PaXI2nWjdyAoDvkQzwLZ/Yugtyeytqm+DPLhuscJWmzZvGbmiuW zGr17Bwl8BiIpUSXR64WXposjfbQw== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bLu2M/l3OooPSqlW6gymY6ZoUeeEKvNsbuJals/oPgoN+1lkwuy4aguQWDLqFvzo+5BaVtk2mpp4xn7KPqrTIo8dH2ExC1oZDyrLtnC2N0cPEt2si8B+xMU4Y2Hw6FD1bIYUWVZll2M+WRp7XVeNeJsAj7U0qRufsNhFlxuJrapohlRXCALJkHjjlSLGEpDBou3lvuQaNDcAUrvIhw0K3nm/2+knDEAvw6FvSLLMNSyI8yYP7GC80IfsiC3LuGe+cM44FAxpKhEozNGxtqewahbj3p6+f11UcwmH/MTWf5PopkUa1sEOgyBUcguvuEGtdqHZzZAS6zReziIcD2RRgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sXbQ2lVahxyj5wDXR/Rtk25By6lJAHCC9qGuKtZYU+8=; b=mmo1AMiJtO6Xx27CFZVcC/VVbPCHxvsZpZXaDgMXsaHyJtxbBK6iRxJOwKSd+lmKhmjXJbuKNg5G9Do5mMCP8JfL3uExln7t5PsutwqMx2fU70YEfchi/3XLlZMhRRP5yDB198PPeFFZV5N2yP0Pa1sILl+aoQ5Vl5RGhcCm/nR+iD+XFq7AZxbaOW3s2M9YvUgiYMdfKC5AM0hlBpt6FF5frIxrYTsqVb2MOc5meAgn2sQ6uimCrrnmfEa2cLkYblr8T/geVhgD9P2atkNp4W4i5/N5WbEhHni00dntMvdjb6wAT1hVYZdB3EoYa/DygPSFPwqBkJOyVMvet0ZFIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sXbQ2lVahxyj5wDXR/Rtk25By6lJAHCC9qGuKtZYU+8=; b=Ofro6Sc1+GWyvB1tdxNLrCqI0FxYFHTiVAM3HELAss3MfC3BwSzdf9zWKjlYo9rgc0HvZ6S/Gq6LbZxsdCDy8IuELJG7GrkxfiClknjrgOrXjzeiBfX7MkAOfK58wx8EDVJLen5gqw3lAeOISPk4K1VWcONSmYxgW2WDStbAXrWMSy/CtY7DHsHQPndvavVjzuPivhPWWO+ROfnxRwuh3PtbeoIERf3+rH08m0if6a6KdxIXda7xWlFQlDwODFQXh2rgY+99P83Watd/Pf/XFAQbLkh0uoYJpggb+0JCDETZhxXgZ6QxzKhFMS9eTQo4e9LUQtgchg3DRJyEQqhrMQ== From: Het Gala To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com, farosas@suse.de, Het Gala Subject: [PATCH v3 7/7] Add negative tests to validate migration QAPIs Date: Wed, 6 Mar 2024 10:49:58 +0000 Message-Id: <20240306104958.39857-8-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20240306104958.39857-1-het.gala@nutanix.com> References: <20240306104958.39857-1-het.gala@nutanix.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To SJ2PR02MB9955.namprd02.prod.outlook.com (2603:10b6:a03:55f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR02MB9955:EE_|DS0PR02MB9617:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c135cc5-c1f4-4369-1b18-08dc3dcb456f x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ay8yvhVuilTAuTK65iYs7xLq7YP6bAeH2OYC8A5EVXypdh/DufIxWeQR4+NPkbDU5DO94kV1IF6kar2Exy2LWAZ1qKNnnKUZuPvPMwvNUYtyItCqiLmcm9g2KPTgVnIFi4oig2fL9aaOrB8M9vD/F3jGzmZbuiPfIDXyg+kzk6SAsweSvQKUvpV1mENklN7vu9gUD8HkPeSxNKYPp7gHLmYA0PkrpclfgbLSuwgzNRpJ1gEHWv63gwd56eNb6wcVjrAU53X+FO0pZXFO+y7oGXoBPf078x6ogpfibg5NqelXNZxprT30KBB2v/TPW9HLfARvlSM4/H1n2JH47s0wolgXMQ8YfF62Ved1foRsRolyIryi8e62NAVQW8poMLFqdVjNAzhqk5BA8R3ZfdqNvgf6n6MpAjYR5j5L9S4/87VfTGv7dn/3eyBuSHKGCYXpG/VIyT6gtW+eoG5Ivd77SMZnQjUMFFgapxWLw9AhSqMCD0ouqhN132FVPtpXolLj8HMUN253k9K/9PvdTTjPDbQf7aCij/nxvpCmgU+bM/XNX/nShoZ7uSCOUqVa1cy0e3ZFRZ3EJmhgHNZjomkAvAJCAe9D28RtqN744EX1XVv13PkY4h0wxpRWQfxPpLWuGqv9PZH0GfxiZIRsJukyjdbl1leLkazTxR6xSnf4xPWXAKD9ldSIfGj3r3l3ArXkfvPd1s7leCFEqS+ctg0Vsw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR02MB9955.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?kQdZERJ3zbIVkFaAI8MHD+Pki5toqPXc+cHRyNTY+SkIsAjrjHlzLQQycNzV?= =?us-ascii?Q?Bu2BoGtKrYUmFj4WuJtSTnLBsB4NVSVJ2JOJtxL0BkJD+FCFMiuuFFQZ43R2?= =?us-ascii?Q?yFXjJ8UefCeC4mjeplvYekNgYwKy1tFF9kTw1TzOL5jlfeD1cDhfsCa6EDPV?= =?us-ascii?Q?Hznmixuk65hwt4jbdVkC06Q/WY3bmOl24lYvado2BqxBU0xjOpPl2P4IuiR6?= =?us-ascii?Q?k91elw8ssrdiUHUpQo3UJYvicCG3+GW/91lXHnneDTcEOn6weVWufSE5dvk5?= =?us-ascii?Q?RsrAf+v1RNoIb9WY5oIa/gOU8x9iyi8cDXtk57/VpOvwV6LI1WOZ9FXmrZsq?= =?us-ascii?Q?VyAW19WjLhiOBj9EKyrYjDphUpLguXTjktWX/w26XfmI/1NIcB9qmeHIelY5?= =?us-ascii?Q?K+k+04FBrE9Ucx3D1TYylnjDf4SIGH4eX6q5ptakacHqYfPPyfG2v0U/qL7p?= =?us-ascii?Q?05nk/Q8viNy5usXW5e2+hynX94tkChU+NkMlwRIecIh1WbaVunJnyAJkFGic?= =?us-ascii?Q?cEtvKDM4H1s9LmqFTdiaODDl67w9likFeeUJomDrIvXhUaYeSEkmvo7XzM0Y?= =?us-ascii?Q?1NGGD9Po40x0euf/haUp4SbbdpZfN55EEj83L6el+dAlwoEPl1eJhWqkzvsV?= =?us-ascii?Q?SWbrAomnZx8tPd/9lGx5FHO6Knp/omaZRSCXpc7itf6DHkcHfJIEj/f2Mzcr?= =?us-ascii?Q?tJMvnHVm/BGl3DhN9LP/tmE2imD3rDE7+/7+uwSf72Hmg6tzgNNNtQ4gtL4A?= =?us-ascii?Q?LkxcJ8UZ7erTtxUfQmQy3L8KkTNkINXGRYqeEqcSLJDbDoF4jZxHazUeStfb?= =?us-ascii?Q?oMR3yOvTgzVVRADEzuxpylOsOkX/ntZbDPEM5qHfu9wNz4LqhSuT0y/5VKlp?= =?us-ascii?Q?OrdDKFMsd/S6ZCDZB/DtpA40bjbV0i/A7TwQgVrjs6bmGS6PV3AV0piGN5tn?= =?us-ascii?Q?P8TOhjoxvLKLSyTb2HC37+abFB7hwORYjNXDIganSgndLZhDFBJEnZ19DTCz?= =?us-ascii?Q?sdI6yMUeF4w28wExRT1k0JlPDARirSOeLw02iB30kUvMBBXhRNtQq1vrBCSE?= =?us-ascii?Q?IZFZTTKgq3in5B7J8DAHvyFPktYchZhkEoP6FHFKsOmTGzviGlA6546GNubl?= =?us-ascii?Q?SHWaFPdYsqRGB0TwkD2JWJaYDgFW1ZkMSpMi7bS3nnXkxORxG62Wci1/mGHt?= =?us-ascii?Q?IQLluhmKtHLovLHe9MCVrcvIApWp229Z9bTCEwaNLLyzAmw+t8oGT81sLkmu?= =?us-ascii?Q?X5ylXdL5NUyoy5ih+ZQHkHXK/AUGKmMtG89cOmPhn6vt52pLJl83b29j1dNX?= =?us-ascii?Q?85+Nd08iFlcE5a0yz948mrV2I/1b8iMLycIlzSSDTf1z+lt+f7zEgWvzeu31?= =?us-ascii?Q?pzeXW0IIEfFv2QAOQjobRJ1BiAOwb2JCjPGe354k7jMR/m9EbuvdRVL9A+BB?= =?us-ascii?Q?2hMUl+L4ebiRwTQD3y5QdOvEfO2jtgOxxJ5wYS9I/RYMioCHiRoRNNZFpLsH?= =?us-ascii?Q?JhGiJsbij3Q9LV+XygSzQczFSsLk9i2QAoDW3y9UR3A0N7DkiHii8hEtUpDr?= =?us-ascii?Q?WKyDWcx/pfrW8LEIkZEblelqd2WDkDmecLhXiWh9?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c135cc5-c1f4-4369-1b18-08dc3dcb456f X-MS-Exchange-CrossTenant-AuthSource: SJ2PR02MB9955.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 10:50:43.3349 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TxE0OqNOy1s5FfS9YYFZEmto0zR9nL5bjL8+IkLPMhbrYowQuo1eNkhcn31Cc0an5peLiSb45BdgBj9Gs8SYgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR02MB9617 X-Proofpoint-ORIG-GUID: PiEHKdwXM-whLRXXy1L_5c8-FfR4r5l1 X-Proofpoint-GUID: PiEHKdwXM-whLRXXy1L_5c8-FfR4r5l1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_06,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.155.12; envelope-from=het.gala@nutanix.com; helo=mx0b-002c1b01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.568, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nutanix.com) X-ZM-MESSAGEID: 1709722302999100001 Content-Type: text/plain; charset="utf-8" Migration QAPI arguments - uri and channels are mutually exhaustive. Add negative validation tests, one with both arguments present and one with none present. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas --- tests/qtest/migration-test.c | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 05e5f3ebe5..1317f87b22 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -2500,6 +2500,56 @@ static void test_validate_uuid_dst_not_set(void) do_test_validate_uuid(&args, false); } =20 +static void do_test_validate_uri_channel(MigrateCommon *args) +{ + QTestState *from, *to; + g_autofree char *connect_uri =3D NULL; + + if (test_migrate_start(&from, &to, args->listen_uri, &args->start)) { + return; + } + + /* Wait for the first serial output from the source */ + wait_for_serial("src_serial"); + + /* + * 'uri' and 'channels' validation is checked even before the migration + * starts. + */ + migrate_qmp_fail(from, args->connect_uri, args->connect_channels, "{}"= ); + test_migrate_end(from, to, false); +} + +static void test_validate_uri_channels_both_set(void) +{ + MigrateCommon args =3D { + .start =3D { + .hide_stderr =3D true, + }, + .listen_uri =3D "defer", + .connect_uri =3D "tcp:127.0.0.1:0", + .connect_channels =3D "[ { 'channel-type': 'main'," + " 'addr': { 'transport': 'socket'," + " 'type': 'inet'," + " 'host': '127.0.0.1'," + " 'port': '0' } } ]", + }; + + do_test_validate_uri_channel(&args); +} + +static void test_validate_uri_channels_none_set(void) +{ + MigrateCommon args =3D { + .start =3D { + .hide_stderr =3D true, + }, + .listen_uri =3D "defer", + }; + + do_test_validate_uri_channel(&args); +} + /* * The way auto_converge works, we need to do too many passes to * run this test. Auto_converge logic is only run once every @@ -3540,6 +3590,10 @@ int main(int argc, char **argv) test_validate_uuid_src_not_set); migration_test_add("/migration/validate_uuid_dst_not_set", test_validate_uuid_dst_not_set); + migration_test_add("/migration/validate_uri/channels/both_set", + test_validate_uri_channels_both_set); + migration_test_add("/migration/validate_uri/channels/none_set", + test_validate_uri_channels_none_set); /* * See explanation why this test is slow on function definition */ --=20 2.22.3