From nobody Tue Feb 10 13:01:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562942031; cv=none; d=zoho.com; s=zohoarc; b=bDX4WkW00F0HJaeEU9QcxZJ1hoa7DqzFa147NPAh33RlX6MPBAZG/xvL+h82xKF3Pa+ci57KKQrEblUEge2N4+l/WeLosrLFOtVAt3ya4j8R/fpiCpB2BuuWLSY7VxVvKtxnsr3xxgWJaBTksc/UB8cUAEHx2VK6FuntjelOHIE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562942031; h=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:ARC-Authentication-Results; bh=evhzB+WASXV4v9bKhed7nDKV14NTXsB+7u4xE0SCvY4=; b=VefZwhlT9L7jRCStit18TWFXjTFP/mZ49tmd6MPwH2iq0HPNsQOSSEMdePlt1j2sKDrFGylwZiTqBCBIMwrdhOjQnfzYj158m4kbeHDQUJQT7dxZeJwhCThMM/9T//BHSjcX4mX0WHd7BsFM51geVhbwRZbrAqtW9OxKuNHKMGk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562942031745843.8459644662215; Fri, 12 Jul 2019 07:33:51 -0700 (PDT) Received: from localhost ([::1]:50018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlwcN-00005b-S2 for importer@patchew.org; Fri, 12 Jul 2019 10:33:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44841) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlwb5-0004LM-Kq for qemu-devel@nongnu.org; Fri, 12 Jul 2019 10:32:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlwb3-0001e2-FU for qemu-devel@nongnu.org; Fri, 12 Jul 2019 10:32:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40776) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlwaz-0001ax-KM for qemu-devel@nongnu.org; Fri, 12 Jul 2019 10:32:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B0E630860A0; Fri, 12 Jul 2019 14:32:20 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.118.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 781F960920; Fri, 12 Jul 2019 14:32:17 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 12 Jul 2019 16:31:51 +0200 Message-Id: <20190712143207.4214-4-quintela@redhat.com> In-Reply-To: <20190712143207.4214-1-quintela@redhat.com> References: <20190712143207.4214-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 12 Jul 2019 14:32:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/19] migration-test: Add migration multifd test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , kvm@vger.kernel.org, Juan Quintela , "Dr. David Alan Gilbert" , Wei Yang , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We set multifd-channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Tested-by: Wei Yang Signed-off-by: Juan Quintela --- tests/migration-test.c | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index a4feb9545d..0dcaad86b5 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -1121,6 +1121,53 @@ static void test_migrate_fd_proto(void) test_migrate_end(from, to, true); } =20 +static void test_multifd_tcp(void) +{ + char *uri; + QTestState *from, *to; + + if (test_migrate_start(&from, &to, "tcp:127.0.0.1:0", false, false)) { + return; + } + + /* + * We want to pick a speed slow enough that the test completes + * quickly, but that it doesn't complete precopy even on a slow + * machine, so also set the downtime. + */ + /* 1 ms should make it not converge*/ + migrate_set_parameter_int(from, "downtime-limit", 1); + /* 1GB/s */ + migrate_set_parameter_int(from, "max-bandwidth", 1000000000); + + migrate_set_parameter_int(from, "multifd-channels", 2); + migrate_set_parameter_int(to, "multifd-channels", 2); + + migrate_set_capability(from, "multifd", "true"); + migrate_set_capability(to, "multifd", "true"); + /* Wait for the first serial output from the source */ + wait_for_serial("src_serial"); + + uri =3D migrate_get_socket_address(to, "socket-address"); + + migrate(from, uri, "{}"); + + wait_for_migration_pass(from); + + /* 300ms it should converge */ + migrate_set_parameter_int(from, "downtime-limit", 600); + + if (!got_stop) { + qtest_qmp_eventwait(from, "STOP"); + } + qtest_qmp_eventwait(to, "RESUME"); + + wait_for_serial("dest_serial"); + wait_for_migration_complete(from); + test_migrate_end(from, to, true); + free(uri); +} + int main(int argc, char **argv) { char template[] =3D "/tmp/migration-test-XXXXXX"; @@ -1176,6 +1223,7 @@ int main(int argc, char **argv) /* qtest_add_func("/migration/ignore_shared", test_ignore_shared); */ qtest_add_func("/migration/xbzrle/unix", test_xbzrle_unix); qtest_add_func("/migration/fd_proto", test_migrate_fd_proto); + qtest_add_func("/migration/multifd/tcp", test_multifd_tcp); =20 ret =3D g_test_run(); =20 --=20 2.21.0