From nobody Mon Feb 9 11:30:22 2026 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=1657220828; cv=none; d=zohomail.com; s=zohoarc; b=D804Aa79jEnR427LRp1hH6aRSdz581AjFN9B3cu9MCUeynAYyPvZy+lpKfPg6yndgPhvYzrcBS6N8l0gplqVMYbXL1y5ouAKs1i2SEKj/f8JKUF0j2mAowo6up4YE/M7/MNnrH4GsvIBS4I5udS20/ZqlNuunFhFcGCTfe35+F4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657220828; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5dZRvfRbv4WzlyS1K+TxJ91b82FUR56T1ik0nvw67lk=; b=dJ/I5tA8aEF1QjKA0J9/RAunRv5SR/27jYLh1d8H3nYAAywqEmDrBdQQXUimZgruFVXoVR5Fwf8OcwNE4myiapaZyBOzvLe81pcP/jCR93DBf86inRmGr+8dZN9Ok1mBK/YIZ1v3XsE6DvHopkCQAEAC0M7ZEOjq8OIwyMF9Ep4= 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 1657220828006308.01205174376594; Thu, 7 Jul 2022 12:07:08 -0700 (PDT) Received: from localhost ([::1]:45090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9WqA-0006So-54 for importer@patchew.org; Thu, 07 Jul 2022 15:07:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9Wf0-0005xW-3V for qemu-devel@nongnu.org; Thu, 07 Jul 2022 14:55:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:57754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9Wey-0001lx-JE for qemu-devel@nongnu.org; Thu, 07 Jul 2022 14:55:33 -0400 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-475-IvTgLcDnNZqsdOHo0z40bg-1; Thu, 07 Jul 2022 14:55:31 -0400 Received: by mail-qt1-f200.google.com with SMTP id bc7-20020a05622a1cc700b0031e7e46e660so10264454qtb.10 for ; Thu, 07 Jul 2022 11:55:30 -0700 (PDT) Received: from localhost.localdomain (bras-base-aurron9127w-grc-37-74-12-30-85.dsl.bell.ca. [74.12.30.85]) by smtp.gmail.com with ESMTPSA id 14-20020ac8594e000000b00304fc3d144esm28764902qtz.1.2022.07.07.11.55.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Jul 2022 11:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657220132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5dZRvfRbv4WzlyS1K+TxJ91b82FUR56T1ik0nvw67lk=; b=huCX9M53AB98C7dEB3huJ/4JEjSeD/P3CPAu1h0eO95x3//eCRO3VKKnuEPu2ePvdb5ffm ezGyeZ/doQHlcIiJTodBwDZRdhxBMPHMHUoo2bRiI4Ybikvol55yP2/dfvaXMnnOvcOLWL bN7oKzPMkRmJTVsFprNLGiO7ntPyduM= X-MC-Unique: IvTgLcDnNZqsdOHo0z40bg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5dZRvfRbv4WzlyS1K+TxJ91b82FUR56T1ik0nvw67lk=; b=xlwkEJugXC6WIrkCS0Rq/D52yinl50TMiXlOwTbQigRJrI5xBWiVtWm0CRo8uDKwDK xSfVnuax1q1+gleGph2rzhU230DjFCjilYQndCo8hoINNSQgNDImCn9rhw2l+r98maui wBZ6wvW+tP9aoPhhAgccVVs+5w+ZreBnTtqOGnWUyA/BR7AhHajmMHI+Xahyf5n8fAJE mBNMaVSrQjvyUH4gMGm9TUIqJ7W5pfnVhF1GAiW8ijTrbtlL/sH1OYyCsdHN5yMRUO41 3/ZpJG4yL+bTpRE6/lSCnToY8WYh5NArcn3mV0PQqCDNMZKjkz30VSenx1dv8d9ifvXd n7Aw== X-Gm-Message-State: AJIora9yHwscuDys0aEi1DOZZaLWiVBa1CQ0ipyLPR+25pzS4njsp43h dP+360cEmCo+ywytFmiZqg1DgfAa8c+WpNiAabHO/Cd3G3qdUP7BYekh902VHkvWqrMtz4ADbxq t7RdIBRyZPjeZsbssPSBu8lEDoudw8rJNacYvyCRCvjKpqirttrn4oaq82188PTfA X-Received: by 2002:ac8:5c12:0:b0:31e:9f86:1632 with SMTP id i18-20020ac85c12000000b0031e9f861632mr2464720qti.123.1657220130289; Thu, 07 Jul 2022 11:55:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uvprnbtq5974YrUoJH1lKM4i7aXMfYHCFqGpn7DPFpRrCEu4IB5s+IIzEU063OsoZgiQds/Q== X-Received: by 2002:ac8:5c12:0:b0:31e:9f86:1632 with SMTP id i18-20020ac85c12000000b0031e9f861632mr2464701qti.123.1657220130020; Thu, 07 Jul 2022 11:55:30 -0700 (PDT) From: Peter Xu To: qemu-devel@nongnu.org Cc: Juan Quintela , peterx@redhat.com, "Dr . David Alan Gilbert" , Leonardo Bras Soares Passos , Manish Mishra , "Daniel P . Berrange" Subject: [PATCH v9 13/14] tests: Add postcopy tls recovery migration test Date: Thu, 7 Jul 2022 14:55:27 -0400 Message-Id: <20220707185527.27747-1-peterx@redhat.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220707185342.26794-1-peterx@redhat.com> References: <20220707185342.26794-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1657220828489100001 Content-Type: text/plain; charset="utf-8" It's easy to build this upon the postcopy tls test. Rename the old postcopy recovery test to postcopy/recovery/plain. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 37 ++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index ee37ad6631..81ef9741cd 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1137,17 +1137,15 @@ static void test_postcopy_tls_psk(void) test_postcopy_common(&args); } =20 -static void test_postcopy_recovery(void) +static void test_postcopy_recovery_common(MigrateCommon *args) { - MigrateCommon args =3D { - .start =3D { - .hide_stderr =3D true, - }, - }; QTestState *from, *to; g_autofree char *uri =3D NULL; =20 - if (migrate_postcopy_prepare(&from, &to, &args)) { + /* Always hide errors for postcopy recover tests since they're expecte= d */ + args->start.hide_stderr =3D true; + + if (migrate_postcopy_prepare(&from, &to, args)) { return; } =20 @@ -1198,7 +1196,24 @@ static void test_postcopy_recovery(void) /* Restore the postcopy bandwidth to unlimited */ migrate_set_parameter_int(from, "max-postcopy-bandwidth", 0); =20 - migrate_postcopy_complete(from, to, &args); + migrate_postcopy_complete(from, to, args); +} + +static void test_postcopy_recovery(void) +{ + MigrateCommon args =3D { }; + + test_postcopy_recovery_common(&args); +} + +static void test_postcopy_recovery_tls_psk(void) +{ + MigrateCommon args =3D { + .start_hook =3D test_migrate_tls_psk_start_match, + .finish_hook =3D test_migrate_tls_psk_finish, + }; + + test_postcopy_recovery_common(&args); } =20 static void test_baddest(void) @@ -2163,6 +2178,12 @@ int main(int argc, char **argv) qtest_add_func("/migration/postcopy/tls/psk", test_postcopy_tls_ps= k); #endif /* CONFIG_GNUTLS */ qtest_add_func("/migration/postcopy/recovery", test_postcopy_recov= ery); + qtest_add_func("/migration/postcopy/recovery/plain", + test_postcopy_recovery); +#ifdef CONFIG_GNUTLS + qtest_add_func("/migration/postcopy/recovery/tls/psk", + test_postcopy_recovery_tls_psk); +#endif /* CONFIG_GNUTLS */ } qtest_add_func("/migration/bad_dest", test_baddest); qtest_add_func("/migration/precopy/unix/plain", test_precopy_unix_plai= n); --=20 2.32.0