From nobody Thu Apr 25 12:18:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574871790; cv=none; d=zohomail.com; s=zohoarc; b=FHRsFMZ1u9Vz/ZbHYnG/csP+URGWrrp0Lmz/PJsuDvkpbgxO8PGUGiX0z+hc55hDMy3W1fEIQqV0unfb9gtbPrAiwbLiQ1lzZzz8vrf0U1O4QP/uYtpO4VyoPD9/sz9Dq58Jjm3sQ8J98zT0BDOnmKcPjnpr9cNw/exYhAn5vDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574871790; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=2OIRDineWGFppgyCFBi/bfLJg5JVnA/X75rit7jfiww=; b=C0/DqlEAlSP9IuJ7XFRbbY4ngOWsDCI27h/FjJNTARziU5kItwAt5HDVKdFKQal+1AR9TLi0dfX4fQ9nma5Fr87hZEcHHqo96btwuE4+o1F+PlwropeU3QyB46VOS/CEEcIs9Ly/tC6hvceaG6ON9d/3udx+Ql/2nIdgpZw2ptc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1574871790467945.7568196586044; Wed, 27 Nov 2019 08:23:10 -0800 (PST) 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-200-bsg6ZLFjOwWwVHtkCTW6jg-1; Wed, 27 Nov 2019 11:23:05 -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 0F39B18557D8; Wed, 27 Nov 2019 16:23:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E63E719C7F; Wed, 27 Nov 2019 16:22:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 24A8A4BB5B; Wed, 27 Nov 2019 16:22:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xARGMpYe007524 for ; Wed, 27 Nov 2019 11:22:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6C3A819C6A; Wed, 27 Nov 2019 16:22:51 +0000 (UTC) Received: from dhcp-16-105.lcy.redhat.com (unknown [10.42.16.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE2B819C69; Wed, 27 Nov 2019 16:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574871789; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2OIRDineWGFppgyCFBi/bfLJg5JVnA/X75rit7jfiww=; b=XMFudaZFf1H0Udf0sPobAPqDEu2y4+C8OCuRAl9mwx730vjo4YubJeWpCsUx9QDEO2PIVB NuPtKgXEkYtEHxtpb5QgMz3MJG+lGoZyTRGwSxStY8boVopZylnNtxBJ+niSOb4gajwdvN WpvtDocqTBIKg1QVqCVAG85PSISabm4= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 27 Nov 2019 16:22:42 +0000 Message-Id: <20191127162242.3711227-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: improve build time for qemuxml2argvtest X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: bsg6ZLFjOwWwVHtkCTW6jg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) On Fedora 31 with GCC 9.2.1, compiling qemuxml2argvtest takes about 36 seconds since commit 30c6d99209cd36bba8e14795622f658827698522 Author: Jiri Denemark Date: Thu Oct 24 17:51:42 2019 +0200 qemuxml2argvtest: Update host arch for DO_TEST*ARCH* tests The optimizer is hitting some pathelogical performance behaviour due to the high number of branches in the mymain() method. Pushing the branch tests down into the testCompareXMLToArgv method brings the compile time down to 3 seconds. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Daniel Henrique Barboza --- tests/qemuxml2argvtest.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a2791d0460..86b8899921 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -412,6 +412,9 @@ testCompareXMLToArgv(const void *data) size_t i; qemuDomainObjPrivatePtr priv =3D NULL; =20 + if (info->arch !=3D VIR_ARCH_NONE && info->arch !=3D VIR_ARCH_X86_64) + qemuTestSetHostArch(driver.caps, info->arch); + memset(&monitor_chr, 0, sizeof(monitor_chr)); =20 if (!(conn =3D virGetConnect())) @@ -580,6 +583,9 @@ testCompareXMLToArgv(const void *data) virSetConnectStorage(NULL); virObjectUnref(conn); VIR_FREE(migrateURI); + if (info->arch !=3D VIR_ARCH_NONE && info->arch !=3D VIR_ARCH_X86_64) + qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE); + return ret; } =20 @@ -699,13 +705,9 @@ mymain(void) __VA_ARGS__, ARG_END) < 0) \ return EXIT_FAILURE; \ testInfoSetPaths(&info, _suffix); \ - if (info.arch !=3D VIR_ARCH_NONE && info.arch !=3D VIR_ARCH_X86_64= ) \ - qemuTestSetHostArch(driver.caps, info.arch); \ if (virTestRun("QEMU XML-2-ARGV " _name _suffix, \ testCompareXMLToArgv, &info) < 0) \ ret =3D -1; \ - if (info.arch !=3D VIR_ARCH_NONE && info.arch !=3D VIR_ARCH_X86_64= ) \ - qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE); \ testQemuInfoClear(&info); \ } while (0) =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list