From nobody Mon Feb 9 14:33:20 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=1659369738; cv=none; d=zohomail.com; s=zohoarc; b=T/d6GNLfj2Q4OliCWzfXcW1RxOFJSpvNgev/KqPFZbdp0g1QsOdUWuDxZa9V4sIlC73G3/mXpIXvtmca+DuOraCX6y/UdNFn5/9NpFtOWRXAvJzzZOy3EhYkzsFXSjSr8Ld89PGNBDsO21O3Sk/9roFIspGYuhmaZigzOnBtWfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659369738; 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; bh=Pd4DSXWZ2BpSI3AA/IPBOY8l4LinBjl/Hl+fz+v0MG0=; b=H2x8ZBv4qWtqg1DOpXaMf+RlnI9/bcWpCeL9iLPgH+y/OKRmK9Ddk5iFyeekdpmfXFZgo7lkpaBuKHFhYwNbWQgU0F4hX/JDqPs5nQIPd7AhMUMRon1Ch8t8vbw7JsBzYPawXc8ZzTom+xKTQ0EjouEaS4d72hTGGcvLGhN3z+0= 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 1659369738978172.61157801965737; Mon, 1 Aug 2022 09:02:18 -0700 (PDT) Received: from localhost ([::1]:46506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIXry-0006NB-TV for importer@patchew.org; Mon, 01 Aug 2022 12:02:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIXlP-00039u-44 for qemu-devel@nongnu.org; Mon, 01 Aug 2022 11:55:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIXlK-0001NE-UY for qemu-devel@nongnu.org; Mon, 01 Aug 2022 11:55:24 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-52-3bSqZCiFPfasTmi_oEHfEQ-1; Mon, 01 Aug 2022 11:55:18 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9FCD7294EDCE; Mon, 1 Aug 2022 15:55:17 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31BFC18EA8; Mon, 1 Aug 2022 15:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659369322; 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=Pd4DSXWZ2BpSI3AA/IPBOY8l4LinBjl/Hl+fz+v0MG0=; b=KJ2Zcj/ALBAN+XfB/70aVMBY6AZtbPWQH8Hu+BEhr6+I2Ng3vEtmPykAYQL8WIGU2TnU9f CMRvWj7WvOXSij94lv9Li8H82Nxwd4bmzvMTjiKEpI1anbOuDWHqU0YjR+IiT8ehfwXA8/ 2sjXhyMkjeBWZt+JEZWOKviX7tDRzjw= X-MC-Unique: 3bSqZCiFPfasTmi_oEHfEQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , Peter Maydell , "Dr. David Alan Gilbert" , peterx@redhat.com, Juan Quintela , Ilya Leoshkevich , berrange@redhat.com Subject: [PULL 2/7] migration-test: Use migrate_ensure_converge() for auto-converge Date: Mon, 1 Aug 2022 17:55:01 +0200 Message-Id: <20220801155506.254316-3-thuth@redhat.com> In-Reply-To: <20220801155506.254316-1-thuth@redhat.com> References: <20220801155506.254316-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 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_NONE=-0.0001, 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: 1659369740905100001 Content-Type: text/plain; charset="utf-8" From: Peter Xu Thomas reported that auto-converge test will timeout on MacOS CI gatings. Use the migrate_ensure_converge() helper too in the auto-converge as when Daniel reworked the other test cases. Since both max_bandwidth / downtime_limit will not be used for converge calculations, make it simple by removing the remaining check, then we can completely remove both variables altogether, since migrate_ensure_converge is used the remaining check won't make much sense anyway. Reported-by: Thomas Huth Suggested-by: Daniel P. Berrange Signed-off-by: Peter Xu Message-Id: <20220728133516.92061-2-peterx@redhat.com> Tested-by: Thomas Huth Reviewed-by: Daniel P. Berrange Signed-off-by: Thomas Huth --- tests/qtest/migration-test.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 71595a74fd..c1e002087d 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1768,7 +1768,7 @@ static void test_migrate_auto_converge(void) g_autofree char *uri =3D g_strdup_printf("unix:%s/migsocket", tmpfs); MigrateStart args =3D {}; QTestState *from, *to; - int64_t remaining, percentage; + int64_t percentage; =20 /* * We want the test to be stable and as fast as possible. @@ -1776,14 +1776,6 @@ static void test_migrate_auto_converge(void) * so we need to decrease a bandwidth. */ const int64_t init_pct =3D 5, inc_pct =3D 50, max_pct =3D 95; - const int64_t max_bandwidth =3D 400000000; /* ~400Mb/s */ - const int64_t downtime_limit =3D 250; /* 250ms */ - /* - * We migrate through unix-socket (> 500Mb/s). - * Thus, expected migration speed ~=3D bandwidth limit (< 500Mb/s). - * So, we can predict expected_threshold - */ - const int64_t expected_threshold =3D max_bandwidth * downtime_limit / = 1000; =20 if (test_migrate_start(&from, &to, uri, &args)) { return; @@ -1818,8 +1810,7 @@ static void test_migrate_auto_converge(void) /* The first percentage of throttling should be equal to init_pct */ g_assert_cmpint(percentage, =3D=3D, init_pct); /* Now, when we tested that throttling works, let it converge */ - migrate_set_parameter_int(from, "downtime-limit", downtime_limit); - migrate_set_parameter_int(from, "max-bandwidth", max_bandwidth); + migrate_ensure_converge(from); =20 /* * Wait for pre-switchover status to check last throttle percentage @@ -1830,11 +1821,6 @@ static void test_migrate_auto_converge(void) /* The final percentage of throttling shouldn't be greater than max_pc= t */ percentage =3D read_migrate_property_int(from, "cpu-throttle-percentag= e"); g_assert_cmpint(percentage, <=3D, max_pct); - - remaining =3D read_ram_property_int(from, "remaining"); - g_assert_cmpint(remaining, <, - (expected_threshold + expected_threshold / 100)); - migrate_continue(from, "pre-switchover"); =20 qtest_qmp_eventwait(to, "RESUME"); @@ -1842,7 +1828,6 @@ static void test_migrate_auto_converge(void) wait_for_serial("dest_serial"); wait_for_migration_complete(from); =20 - test_migrate_end(from, to, true); } =20 --=20 2.31.1