From nobody Sat Apr 5 01:06:01 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1739622769; cv=none; d=zohomail.com; s=zohoarc; b=UOGM/isPqoLAtFeOxXkyiHS40s4WsBapKW2ufBqq3Baou3dHuRVl4xwZi31nbSP/7FEJwjnGfF387tzRJhwdMBYNih65j69K73O5g+igrT97PTMoTEJ0W59Hmrcf3rzW3rHGVtqlgq13MEj80/pnc76u+6CrFfIIE3w2AW2VGK8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739622769; h=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=ia6z9VYSCSmEQiJTZCU45yQKDwD7VqaFb4dVmeZo3VM=; b=ZXhtDgldr2OIAMknphdJN1nnISlvZDTL+OKmRyHj2GzBInr3kIB70kUhEWfkFWvkV1A/CF3bk3oKRbgAZIfzBI1yRCyh/pchzZWfMUSNwErfysi93CKZu6WbUSKmfcBw/+6ECL4TfjEqXTCPW2ktGWHWtfH9US12xx6ghkHdjm4= ARC-Authentication-Results: i=1; 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; 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 1739622769911822.4103664777803; Sat, 15 Feb 2025 04:32:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjHL6-00066i-Ks; Sat, 15 Feb 2025 07:32:08 -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 1tjHKt-000641-81 for qemu-devel@nongnu.org; Sat, 15 Feb 2025 07:31:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjHKq-0002oC-LU for qemu-devel@nongnu.org; Sat, 15 Feb 2025 07:31:54 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-267-fZ1gXu8LO5agBHeaNxJM_Q-1; Sat, 15 Feb 2025 07:31:47 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EA0791975AFC; Sat, 15 Feb 2025 12:31:45 +0000 (UTC) Received: from kaapi.redhat.com (unknown [10.74.16.149]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CF1DA1800365; Sat, 15 Feb 2025 12:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739622711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ia6z9VYSCSmEQiJTZCU45yQKDwD7VqaFb4dVmeZo3VM=; b=FS0YzPFNwcHrk8IOTvyG2D7iEB14HIYfHdI1uKe/jfBWtU+dBkRkfLlpDW1sdWXuovNBoL f9SC0kK0M3nFf1TMXD/O37XNzwrMYsFmS25LaMhzZkJ2R+Rcx2q+yIS7LUM7ToMTQkvi3l DbK4X/k3HtrE2SaS0ULsWHB411a2acE= X-MC-Unique: fZ1gXu8LO5agBHeaNxJM_Q-1 X-Mimecast-MFC-AGG-ID: fZ1gXu8LO5agBHeaNxJM_Q_1739622706 From: Prasad Pandit To: qemu-devel@nongnu.org Cc: peterx@redhat.com, farosas@suse.de, berrange@redhat.com, Prasad Pandit Subject: [PATCH v6 3/4] tests/qtest/migration: consolidate set capabilities Date: Sat, 15 Feb 2025 18:01:18 +0530 Message-ID: <20250215123119.814345-4-ppandit@redhat.com> In-Reply-To: <20250215123119.814345-1-ppandit@redhat.com> References: <20250215123119.814345-1-ppandit@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=ppandit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.195, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @redhat.com) X-ZM-MESSAGEID: 1739622772976019100 Content-Type: text/plain; charset="utf-8" From: Prasad Pandit Migration capabilities are set in multiple '.start_hook' functions for various tests. Instead, consolidate setting capabilities in 'set_migration_capabilities()' function which is called from various 'test_*_common()' functions. While simplifying the capabilities setting, it helps to declutter the qtest sources. Suggested-by: Fabiano Rosas Signed-off-by: Prasad Pandit --- tests/qtest/migration/compression-tests.c | 10 ++-- tests/qtest/migration/cpr-tests.c | 4 +- tests/qtest/migration/file-tests.c | 44 +++++------------- tests/qtest/migration/framework.c | 56 +++++++++++++++++------ tests/qtest/migration/framework.h | 4 +- tests/qtest/migration/postcopy-tests.c | 4 +- tests/qtest/migration/precopy-tests.c | 19 +++----- tests/qtest/migration/tls-tests.c | 11 ++++- 8 files changed, 80 insertions(+), 72 deletions(-) v6: - Reorder, make this the first qtest patch in this series. v5: - https://lore.kernel.org/qemu-devel/20250205122712.229151-1-ppandit@redhat= .com/T/#t diff --git a/tests/qtest/migration/compression-tests.c b/tests/qtest/migrat= ion/compression-tests.c index 8b58401b84..4558a7b9ff 100644 --- a/tests/qtest/migration/compression-tests.c +++ b/tests/qtest/migration/compression-tests.c @@ -35,6 +35,7 @@ static void test_multifd_tcp_zstd(void) { MigrateCommon args =3D { .listen_uri =3D "defer", + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, .start_hook =3D migrate_hook_start_precopy_tcp_multifd_zstd, }; test_precopy_common(&args); @@ -56,6 +57,7 @@ static void test_multifd_tcp_qatzip(void) { MigrateCommon args =3D { .listen_uri =3D "defer", + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, .start_hook =3D migrate_hook_start_precopy_tcp_multifd_qatzip, }; test_precopy_common(&args); @@ -74,6 +76,7 @@ static void test_multifd_tcp_qpl(void) { MigrateCommon args =3D { .listen_uri =3D "defer", + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, .start_hook =3D migrate_hook_start_precopy_tcp_multifd_qpl, }; test_precopy_common(&args); @@ -92,6 +95,7 @@ static void test_multifd_tcp_uadk(void) { MigrateCommon args =3D { .listen_uri =3D "defer", + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, .start_hook =3D migrate_hook_start_precopy_tcp_multifd_uadk, }; test_precopy_common(&args); @@ -103,10 +107,6 @@ migrate_hook_start_xbzrle(QTestState *from, QTestState *to) { migrate_set_parameter_int(from, "xbzrle-cache-size", 33554432); - - migrate_set_capability(from, "xbzrle", true); - migrate_set_capability(to, "xbzrle", true); - return NULL; } =20 @@ -118,6 +118,7 @@ static void test_precopy_unix_xbzrle(void) .listen_uri =3D uri, .start_hook =3D migrate_hook_start_xbzrle, .iterations =3D 2, + .caps[MIGRATION_CAPABILITY_XBZRLE] =3D true, /* * XBZRLE needs pages to be modified when doing the 2nd+ round * iteration to have real data pushed to the stream. @@ -146,6 +147,7 @@ static void test_multifd_tcp_zlib(void) { MigrateCommon args =3D { .listen_uri =3D "defer", + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, .start_hook =3D migrate_hook_start_precopy_tcp_multifd_zlib, }; test_precopy_common(&args); diff --git a/tests/qtest/migration/cpr-tests.c b/tests/qtest/migration/cpr-= tests.c index 4758841824..a175646b57 100644 --- a/tests/qtest/migration/cpr-tests.c +++ b/tests/qtest/migration/cpr-tests.c @@ -24,9 +24,6 @@ static void *migrate_hook_start_mode_reboot(QTestState *f= rom, QTestState *to) migrate_set_parameter_str(from, "mode", "cpr-reboot"); migrate_set_parameter_str(to, "mode", "cpr-reboot"); =20 - migrate_set_capability(from, "x-ignore-shared", true); - migrate_set_capability(to, "x-ignore-shared", true); - return NULL; } =20 @@ -39,6 +36,7 @@ static void test_mode_reboot(void) .connect_uri =3D uri, .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_mode_reboot, + .caps[MIGRATION_CAPABILITY_X_IGNORE_SHARED] =3D true, }; =20 test_file_common(&args, true); diff --git a/tests/qtest/migration/file-tests.c b/tests/qtest/migration/fil= e-tests.c index f260e2871d..6253ece687 100644 --- a/tests/qtest/migration/file-tests.c +++ b/tests/qtest/migration/file-tests.c @@ -107,15 +107,6 @@ static void test_precopy_file_offset_bad(void) test_file_common(&args, false); } =20 -static void *migrate_hook_start_mapped_ram(QTestState *from, - QTestState *to) -{ - migrate_set_capability(from, "mapped-ram", true); - migrate_set_capability(to, "mapped-ram", true); - - return NULL; -} - static void test_precopy_file_mapped_ram_live(void) { g_autofree char *uri =3D g_strdup_printf("file:%s/%s", tmpfs, @@ -123,7 +114,7 @@ static void test_precopy_file_mapped_ram_live(void) MigrateCommon args =3D { .connect_uri =3D uri, .listen_uri =3D "defer", - .start_hook =3D migrate_hook_start_mapped_ram, + .caps[MIGRATION_CAPABILITY_MAPPED_RAM] =3D true, }; =20 test_file_common(&args, false); @@ -136,26 +127,12 @@ static void test_precopy_file_mapped_ram(void) MigrateCommon args =3D { .connect_uri =3D uri, .listen_uri =3D "defer", - .start_hook =3D migrate_hook_start_mapped_ram, + .caps[MIGRATION_CAPABILITY_MAPPED_RAM] =3D true, }; =20 test_file_common(&args, true); } =20 -static void *migrate_hook_start_multifd_mapped_ram(QTestState *from, - QTestState *to) -{ - migrate_hook_start_mapped_ram(from, to); - - migrate_set_parameter_int(from, "multifd-channels", 4); - migrate_set_parameter_int(to, "multifd-channels", 4); - - migrate_set_capability(from, "multifd", true); - migrate_set_capability(to, "multifd", true); - - return NULL; -} - static void test_multifd_file_mapped_ram_live(void) { g_autofree char *uri =3D g_strdup_printf("file:%s/%s", tmpfs, @@ -163,7 +140,8 @@ static void test_multifd_file_mapped_ram_live(void) MigrateCommon args =3D { .connect_uri =3D uri, .listen_uri =3D "defer", - .start_hook =3D migrate_hook_start_multifd_mapped_ram, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, + .caps[MIGRATION_CAPABILITY_MAPPED_RAM] =3D true, }; =20 test_file_common(&args, false); @@ -176,7 +154,8 @@ static void test_multifd_file_mapped_ram(void) MigrateCommon args =3D { .connect_uri =3D uri, .listen_uri =3D "defer", - .start_hook =3D migrate_hook_start_multifd_mapped_ram, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, + .caps[MIGRATION_CAPABILITY_MAPPED_RAM] =3D true, }; =20 test_file_common(&args, true); @@ -185,8 +164,6 @@ static void test_multifd_file_mapped_ram(void) static void *migrate_hook_start_multifd_mapped_ram_dio(QTestState *from, QTestState *to) { - migrate_hook_start_multifd_mapped_ram(from, to); - migrate_set_parameter_bool(from, "direct-io", true); migrate_set_parameter_bool(to, "direct-io", true); =20 @@ -201,6 +178,8 @@ static void test_multifd_file_mapped_ram_dio(void) .connect_uri =3D uri, .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_multifd_mapped_ram_dio, + .caps[MIGRATION_CAPABILITY_MAPPED_RAM] =3D true, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; =20 if (!probe_o_direct_support(tmpfs)) { @@ -246,7 +225,6 @@ static void *migrate_hook_start_multifd_mapped_ram_fdse= t_dio(QTestState *from, fdset_add_fds(from, file, O_WRONLY, 2, true); fdset_add_fds(to, file, O_RDONLY, 2, true); =20 - migrate_hook_start_multifd_mapped_ram(from, to); migrate_set_parameter_bool(from, "direct-io", true); migrate_set_parameter_bool(to, "direct-io", true); =20 @@ -261,8 +239,6 @@ static void *migrate_hook_start_multifd_mapped_ram_fdse= t(QTestState *from, fdset_add_fds(from, file, O_WRONLY, 2, false); fdset_add_fds(to, file, O_RDONLY, 2, false); =20 - migrate_hook_start_multifd_mapped_ram(from, to); - return NULL; } =20 @@ -275,6 +251,8 @@ static void test_multifd_file_mapped_ram_fdset(void) .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_multifd_mapped_ram_fdset, .end_hook =3D migrate_hook_end_multifd_mapped_ram_fdset, + .caps[MIGRATION_CAPABILITY_MAPPED_RAM] =3D true, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; =20 test_file_common(&args, true); @@ -289,6 +267,8 @@ static void test_multifd_file_mapped_ram_fdset_dio(void) .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_multifd_mapped_ram_fdset_dio, .end_hook =3D migrate_hook_end_multifd_mapped_ram_fdset, + .caps[MIGRATION_CAPABILITY_MAPPED_RAM] =3D true, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; =20 if (!probe_o_direct_support(tmpfs)) { diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/fram= ework.c index 10e1d04b58..82aaa13e85 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -207,6 +207,31 @@ static QList *migrate_start_get_qmp_capabilities(const= MigrateStart *args) return capabilities; } =20 +static void set_migration_capabilities(QTestState *from, + QTestState *to, MigrateCommon *arg= s) +{ + /* + * MigrationCapability_lookup and MIGRATION_CAPABILITY_ constants + * are from qapi-types-migration.h. + */ + for (uint8_t i =3D 0; i < MIGRATION_CAPABILITY__MAX; i++) + { + if (!args->caps[i]) { + continue; + } + if (from) { + migrate_set_capability(from, + MigrationCapability_lookup.array[i], true); + } + if (to) { + migrate_set_capability(to, + MigrationCapability_lookup.array[i], true); + } + } + + return; +} + int migrate_start(QTestState **from, QTestState **to, const char *uri, MigrateStart *args) { @@ -440,17 +465,12 @@ static int migrate_postcopy_prepare(QTestState **from= _ptr, args->postcopy_data =3D args->start_hook(from, to); } =20 - migrate_set_capability(from, "postcopy-ram", true); - migrate_set_capability(to, "postcopy-ram", true); - migrate_set_capability(to, "postcopy-blocktime", true); - - if (args->postcopy_preempt) { - migrate_set_capability(from, "postcopy-preempt", true); - migrate_set_capability(to, "postcopy-preempt", true); - } + /* set postcopy capabilities */ + args->caps[MIGRATION_CAPABILITY_POSTCOPY_BLOCKTIME] =3D true; + args->caps[MIGRATION_CAPABILITY_POSTCOPY_RAM] =3D true; + set_migration_capabilities(from, to, args); =20 migrate_ensure_non_converge(from); - migrate_prepare_for_dirty_mem(from); qtest_qmp_assert_success(to, "{ 'execute': 'migrate-incoming'," " 'arguments': { " @@ -717,6 +737,12 @@ void test_precopy_common(MigrateCommon *args) return; } =20 + set_migration_capabilities(from, to, args); + if (args->caps[MIGRATION_CAPABILITY_MULTIFD]) { + migrate_set_parameter_int(from, "multifd-channels", 16); + migrate_set_parameter_int(to, "multifd-channels", 16); + } + if (args->start_hook) { data_hook =3D args->start_hook(from, to); } @@ -888,6 +914,12 @@ void test_file_common(MigrateCommon *args, bool stop_s= rc) */ g_assert_false(args->live); =20 + set_migration_capabilities(from, to, args); + if (args->caps[MIGRATION_CAPABILITY_MULTIFD]) { + migrate_set_parameter_int(from, "multifd-channels", 4); + migrate_set_parameter_int(to, "multifd-channels", 4); + } + if (g_strrstr(args->connect_uri, "offset=3D")) { check_offset =3D true; /* @@ -948,15 +980,9 @@ void *migrate_hook_start_precopy_tcp_multifd_common(QT= estState *from, QTestState *to, const char *method) { - migrate_set_parameter_int(from, "multifd-channels", 16); - migrate_set_parameter_int(to, "multifd-channels", 16); - migrate_set_parameter_str(from, "multifd-compression", method); migrate_set_parameter_str(to, "multifd-compression", method); =20 - migrate_set_capability(from, "multifd", true); - migrate_set_capability(to, "multifd", true); - /* Start incoming migration from the 1st socket */ migrate_incoming_qmp(to, "tcp:127.0.0.1:0", NULL, "{}"); =20 diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/fram= ework.h index e4a11870f6..74d53eee69 100644 --- a/tests/qtest/migration/framework.h +++ b/tests/qtest/migration/framework.h @@ -12,6 +12,7 @@ #define TEST_FRAMEWORK_H =20 #include "libqtest.h" +#include =20 #define FILE_TEST_FILENAME "migfile" #define FILE_TEST_OFFSET 0x1000 @@ -207,8 +208,9 @@ typedef struct { =20 /* Postcopy specific fields */ void *postcopy_data; - bool postcopy_preempt; PostcopyRecoveryFailStage postcopy_recovery_fail_stage; + + bool caps[MIGRATION_CAPABILITY__MAX]; } MigrateCommon; =20 void wait_for_serial(const char *side); diff --git a/tests/qtest/migration/postcopy-tests.c b/tests/qtest/migration= /postcopy-tests.c index 982457bed1..b0e70a6367 100644 --- a/tests/qtest/migration/postcopy-tests.c +++ b/tests/qtest/migration/postcopy-tests.c @@ -39,7 +39,7 @@ static void test_postcopy_suspend(void) static void test_postcopy_preempt(void) { MigrateCommon args =3D { - .postcopy_preempt =3D true, + .caps[MIGRATION_CAPABILITY_POSTCOPY_PREEMPT] =3D true, }; =20 test_postcopy_common(&args); @@ -73,7 +73,7 @@ static void test_postcopy_recovery_fail_reconnect(void) static void test_postcopy_preempt_recovery(void) { MigrateCommon args =3D { - .postcopy_preempt =3D true, + .caps[MIGRATION_CAPABILITY_POSTCOPY_PREEMPT] =3D true, }; =20 test_postcopy_recovery_common(&args); diff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/= precopy-tests.c index 162fa69531..e5d8c49dbe 100644 --- a/tests/qtest/migration/precopy-tests.c +++ b/tests/qtest/migration/precopy-tests.c @@ -107,23 +107,12 @@ static void test_precopy_tcp_plain(void) test_precopy_common(&args); } =20 -static void *migrate_hook_start_switchover_ack(QTestState *from, QTestStat= e *to) -{ - - migrate_set_capability(from, "return-path", true); - migrate_set_capability(to, "return-path", true); - - migrate_set_capability(from, "switchover-ack", true); - migrate_set_capability(to, "switchover-ack", true); - - return NULL; -} - static void test_precopy_tcp_switchover_ack(void) { MigrateCommon args =3D { .listen_uri =3D "tcp:127.0.0.1:0", - .start_hook =3D migrate_hook_start_switchover_ack, + .caps[MIGRATION_CAPABILITY_RETURN_PATH] =3D true, + .caps[MIGRATION_CAPABILITY_SWITCHOVER_ACK] =3D true, /* * Source VM must be running in order to consider the switchover A= CK * when deciding to do switchover or not. @@ -392,6 +381,7 @@ static void test_multifd_tcp_uri_none(void) MigrateCommon args =3D { .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_precopy_tcp_multifd, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, /* * Multifd is more complicated than most of the features, it * directly takes guest page buffers when sending, make sure @@ -407,6 +397,7 @@ static void test_multifd_tcp_zero_page_legacy(void) MigrateCommon args =3D { .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_precopy_tcp_multifd_zero_page_l= egacy, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, /* * Multifd is more complicated than most of the features, it * directly takes guest page buffers when sending, make sure @@ -422,6 +413,7 @@ static void test_multifd_tcp_no_zero_page(void) MigrateCommon args =3D { .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_precopy_tcp_multifd_no_zero_pag= e, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, /* * Multifd is more complicated than most of the features, it * directly takes guest page buffers when sending, make sure @@ -438,6 +430,7 @@ static void test_multifd_tcp_channels_none(void) .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_precopy_tcp_multifd, .live =3D true, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, .connect_channels =3D ("[ { 'channel-type': 'main'," " 'addr': { 'transport': 'socket'," " 'type': 'inet'," diff --git a/tests/qtest/migration/tls-tests.c b/tests/qtest/migration/tls-= tests.c index 2cb4a44bcd..30ab79e058 100644 --- a/tests/qtest/migration/tls-tests.c +++ b/tests/qtest/migration/tls-tests.c @@ -375,9 +375,9 @@ static void test_postcopy_tls_psk(void) static void test_postcopy_preempt_tls_psk(void) { MigrateCommon args =3D { - .postcopy_preempt =3D true, .start_hook =3D migrate_hook_start_tls_psk_match, .end_hook =3D migrate_hook_end_tls_psk, + .caps[MIGRATION_CAPABILITY_POSTCOPY_PREEMPT] =3D true, }; =20 test_postcopy_common(&args); @@ -397,9 +397,9 @@ static void test_postcopy_recovery_tls_psk(void) static void test_postcopy_preempt_all(void) { MigrateCommon args =3D { - .postcopy_preempt =3D true, .start_hook =3D migrate_hook_start_tls_psk_match, .end_hook =3D migrate_hook_end_tls_psk, + .caps[MIGRATION_CAPABILITY_POSTCOPY_PREEMPT] =3D true, }; =20 test_postcopy_recovery_common(&args); @@ -631,6 +631,7 @@ static void test_multifd_tcp_tls_psk_match(void) .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_multifd_tcp_tls_psk_match, .end_hook =3D migrate_hook_end_tls_psk, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; test_precopy_common(&args); } @@ -645,6 +646,7 @@ static void test_multifd_tcp_tls_psk_mismatch(void) .start_hook =3D migrate_hook_start_multifd_tcp_tls_psk_mismatch, .end_hook =3D migrate_hook_end_tls_psk, .result =3D MIG_TEST_FAIL, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; test_precopy_common(&args); } @@ -656,6 +658,7 @@ static void test_multifd_tcp_tls_x509_default_host(void) .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_multifd_tls_x509_default_host, .end_hook =3D migrate_hook_end_tls_x509, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; test_precopy_common(&args); } @@ -666,6 +669,7 @@ static void test_multifd_tcp_tls_x509_override_host(voi= d) .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_multifd_tls_x509_override_host, .end_hook =3D migrate_hook_end_tls_x509, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; test_precopy_common(&args); } @@ -693,6 +697,7 @@ static void test_multifd_tcp_tls_x509_mismatch_host(voi= d) .start_hook =3D migrate_hook_start_multifd_tls_x509_mismatch_host, .end_hook =3D migrate_hook_end_tls_x509, .result =3D MIG_TEST_FAIL, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; test_precopy_common(&args); } @@ -703,6 +708,7 @@ static void test_multifd_tcp_tls_x509_allow_anon_client= (void) .listen_uri =3D "defer", .start_hook =3D migrate_hook_start_multifd_tls_x509_allow_anon_cli= ent, .end_hook =3D migrate_hook_end_tls_x509, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; test_precopy_common(&args); } @@ -717,6 +723,7 @@ static void test_multifd_tcp_tls_x509_reject_anon_clien= t(void) .start_hook =3D migrate_hook_start_multifd_tls_x509_reject_anon_cl= ient, .end_hook =3D migrate_hook_end_tls_x509, .result =3D MIG_TEST_FAIL, + .caps[MIGRATION_CAPABILITY_MULTIFD] =3D true, }; test_precopy_common(&args); } -- 2.48.1