Received: by 2002:a19:c345:0:0:0:0:0 with SMTP id t66csp5266827lff; Tue, 14 Jan 2020 01:26:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyrwAAhJVjJAGDxPhE0hMfjE8z6qnR0thrp5UZWend1qDQkn7KZuzNAXpo8HGlD1dmi5fTY X-Received: by 2002:a05:620a:634:: with SMTP id 20mr15999716qkv.269.1578994014076; Tue, 14 Jan 2020 01:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578994014; cv=none; d=google.com; s=arc-20160816; b=uYj7m1pscS8dxf/LD79pJJy2taiepkvC6OkK6iubaMZJXuVbVlwAAnA7hihe1UHVvS rWfW0ZQwybva5835+6qfKon1Q1dRNIkbw1fCay9/1lcgbMnOL4w+U8/dwbteEXfYLZz4 xldzrXXg7xY9CbfJI3TYy6avv7Zh6o7wJaoKsVecdzASgJQn4Buk5J4zGESrs8KJXJJ/ XXVOWJF7jtWCQbtBEKxBz/YnToVlvn0Lbm6Fo7nEyUVHBsELdpSOQ5/Sesv55fppR2Hb +jfakUlZpauvHnH2KtYUNbTGgdDYvhWN1QpQlVtIXWuXOJDbWR7+YSgZmUctb1pcAv+Y rrHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=OFbuBsfI2hdknoUqcqxf7Pz5nXpd3viWe9nVgMcqFyk=; b=JZ/ZlSITRLJhl1z+0iBc8gv5v4mqRVKcvWY5IIZ02TPs2z/R47lCbP25s2Bs5vdMWE NAV0JYwGnFVuc3TSv3k8SSQN2eSt2XPn4vVDSd0pYHGY4jgivH0ur9+bXOWPjMpU+1fu 3EvwfQKyKQvlBRyy30B7b8MbLEHqFEnC/jWXYhoTlTmmM1L0X0ZIX0m/Ouyd4472c6ig 5+hqj2LeY2HKcoBlksKlIGwnpTCyrxZibEp1ylI06DXxeBe5vGTAz8O6sj/zc9FLu+Ql EZqU2uD01prvH2weoGCyrsaFZ+sJf+qPf642mOqpNMf2jT0HQrn1SUCxdk76S4/yDeWn lVfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="K/GHJbAj"; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z18si7884289qvv.210.2020.01.14.01.26.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jan 2020 01:26:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="K/GHJbAj"; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:34956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irITN-0004ib-45 for alex.bennee@linaro.org; Tue, 14 Jan 2020 04:26:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57141) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irIT1-0004Q7-PR for qemu-arm@nongnu.org; Tue, 14 Jan 2020 04:26:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irIT0-0006IR-Fj for qemu-arm@nongnu.org; Tue, 14 Jan 2020 04:26:31 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:32911 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1irIT0-0006IF-BG for qemu-arm@nongnu.org; Tue, 14 Jan 2020 04:26:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578993990; 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=OFbuBsfI2hdknoUqcqxf7Pz5nXpd3viWe9nVgMcqFyk=; b=K/GHJbAjuz9g2x2QQt3JXLJdT0CUqiDWamNpptoKJOY84xmeVLPlhmxKVVmjaMoOfJQiDy DxRNhD8rlJrn81z8gni3h+450IZtySveO3JKyTdxbc94CnrXX1KOdf4QL0Fwy8c1VXtjvn zcG9UMpoQwGRQZIjRmqhGonDKaykWNs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-21RP2guBMx6Bwo4jE1J9gQ-1; Tue, 14 Jan 2020 04:26:28 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AA768800D5A; Tue, 14 Jan 2020 09:26:26 +0000 (UTC) Received: from secure.mitica (ovpn-116-207.ams2.redhat.com [10.36.116.207]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28341384; Tue, 14 Jan 2020 09:26:21 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PULL 02/29] migration-test: Add migration multifd test Date: Tue, 14 Jan 2020 10:25:39 +0100 Message-Id: <20200114092606.1761-3-quintela@redhat.com> In-Reply-To: <20200114092606.1761-1-quintela@redhat.com> References: <20200114092606.1761-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 21RP2guBMx6Bwo4jE1J9gQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-arm@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 , Corey Minyard , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Peter Maydell , Stefan Weil , Jason Wang , Juan Quintela , "Dr. David Alan Gilbert" , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Wei Yang , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , David Gibson , Andrzej Zaborowski , Richard Henderson , Stefan Berger Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: iavwD7dAMRrg We set multifd-channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Tested-by: Wei Yang --- tests/qtest/migration-test.c | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 53afec4395..fb70214f44 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1202,6 +1202,61 @@ static void test_migrate_auto_converge(void) test_migrate_end(from, to, true); } =20 +static void test_multifd_tcp(void) +{ + MigrateStart *args =3D migrate_start_new(); + QTestState *from, *to; + QDict *rsp; + char *uri; + + if (test_migrate_start(&from, &to, "defer", args)) { + 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", 16); + migrate_set_parameter_int(to, "multifd-channels", 16); + + migrate_set_capability(from, "multifd", "true"); + migrate_set_capability(to, "multifd", "true"); + + /* Start incoming migration from the 1st socket */ + rsp =3D wait_command(to, "{ 'execute': 'migrate-incoming'," + " 'arguments': { 'uri': 'tcp:127.0.0.1:0' }}")= ; + qobject_unref(rsp); + + /* Wait for the first serial output from the source */ + wait_for_serial("src_serial"); + + uri =3D migrate_get_socket_address(to, "socket-address"); + + migrate_qmp(from, uri, "{}"); + + wait_for_migration_pass(from); + + /* 300ms it should converge */ + migrate_set_parameter_int(from, "downtime-limit", 300); + + 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"; @@ -1266,6 +1321,7 @@ int main(int argc, char **argv) test_validate_uuid_dst_not_set); =20 qtest_add_func("/migration/auto_converge", test_migrate_auto_converge)= ; + qtest_add_func("/migration/multifd/tcp", test_multifd_tcp); =20 ret =3D g_test_run(); =20 --=20 2.24.1