From nobody Wed Mar 12 17:48:55 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174109206503772.25144579915741; Tue, 4 Mar 2025 04:41:05 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 48F281410; Tue, 4 Mar 2025 07:41:04 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D2BC6143B; Tue, 4 Mar 2025 07:38:56 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 697B313DD; Tue, 4 Mar 2025 07:38:51 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id EEB9A136C for ; Tue, 4 Mar 2025 07:38:42 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-643-JxpDzKTiPl-Qi2-GLYuqvA-1; Tue, 04 Mar 2025 07:38:40 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 70DCC1800879 for ; Tue, 4 Mar 2025 12:38:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.15]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1DD1119560AB for ; Tue, 4 Mar 2025 12:38:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741091922; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=xz73KbKZnXfb5J1DKP19TrrpESoIg9aJwSyOI3vokTw=; b=SjtOh4CzerlRqpI5DOmzATBSiGAjFkT/kQZaPfsiY95zNAPiuiJf5Aj2/e54zpTfCyigvY IQ8I3aJoboz6TwLDhr5iVGVvYLfiEd385JPwk+SV9haiLDwMi7EP31RhWKNJd8gfyJr2PQ m0Q2Z/5BGWVrV+v1Z3ujTlKTLTtZgAo= X-MC-Unique: JxpDzKTiPl-Qi2-GLYuqvA-1 X-Mimecast-MFC-AGG-ID: JxpDzKTiPl-Qi2-GLYuqvA_1741091919 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 2/8] domaincapstest: Use proper input file based on 'variant' in 'fillQemuCaps' Date: Tue, 4 Mar 2025 13:38:27 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: zwkzW72d_VO4jqdy3u4edm4Pf44j_PitleennzfQEPo_1741091919 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QPH77ZRRHI42F5ZJPIMBIRZHL2JQXI5W X-Message-ID-Hash: QPH77ZRRHI42F5ZJPIMBIRZHL2JQXI5W X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741092065980019000 Content-Type: text/plain; charset="utf-8" The qemu part of 'domaincapstest' supports testing of the '+hvf' variant of files, but doesn't properly pick the input file. The input file lacks the variant part thus the wrong file is used. Propagate the variant and select the correct input file. Fixes: 738c5bae888cfa72ed359899cf1a41fed9dbb0f5 Signed-off-by: Peter Krempa --- .../qemu_7.0.0-hvf.aarch64+hvf.xml | 43 +- .../qemu_7.2.0-hvf.x86_64+hvf.xml | 952 +++++++++++++++++- tests/domaincapstest.c | 12 +- 3 files changed, 1001 insertions(+), 6 deletions(-) diff --git a/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml b/tests/do= maincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml index bf130dde10..e3d4dbd3db 100644 --- a/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml +++ b/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml @@ -3,6 +3,7 @@ hvf virt-7.0 aarch64 + @@ -37,7 +38,47 @@ - + + a64fx + arm1026 + arm1136 + arm1136-r2 + arm1176 + arm11mpcore + arm926 + arm946 + cortex-a15 + cortex-a53 + cortex-a57 + cortex-a7 + cortex-a72 + cortex-a8 + cortex-a9 + cortex-m0 + cortex-m3 + cortex-m33 + cortex-m4 + cortex-m55 + cortex-m7 + cortex-r5 + cortex-r5f + max + pxa250 + pxa255 + pxa260 + pxa261 + pxa262 + pxa270 + pxa270-a0 + pxa270-a1 + pxa270-b0 + pxa270-b1 + pxa270-c0 + pxa270-c5 + sa1100 + sa1110 + ti925t + diff --git a/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml b/tests/dom= aincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml index 75b2f1102d..ce2e4f9f37 100644 --- a/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml +++ b/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml @@ -3,6 +3,7 @@ hvf pc-i440fx-7.2 x86_64 + @@ -38,8 +39,955 @@ off - - + + EPYC-Rome + AMD + + + + + + + + + + + + + + + + + + + + + + + + + + + + 486 + 486-v1 + Bro= adwell + + + + + + + + Bro= adwell-IBRS + + + + + + + + + Bro= adwell-noTSX + + + + + + Bro= adwell-noTSX-IBRS + + + + + + + Broadwell-v1 + + + + + + + + Broadwell-v2 + + + + + + Broadwell-v3 + + + + + + + + + Broadwell-v4 + + + + + + + Cascadelake-Server + + + + + + + + + + + + + + + + Cascadelake-Server-noTSX + + + + + + + + + + + + + + + Cascadelake-Server-v1 + + + + + + + + + + + + + + + + Cascadelake-Server-v2 + + + + + + + + + + + + + + + + + Cascadelake-Server-v3 + + + + + + + + + + + + + + + Cascadelake-Server-v4 + + + + + + + + + + + + + + + Cascadelake-Server-v5 + + + + + + + + + + + + + + + Conro= e + Conroe-v1 + Co= operlake + + + + + + + + + + + + + + + + + + + Cooperlake-v1 + + + + + + + + + + + + + + + + + + + Cooperlake-v2 + + + + + + + + + + + + + + + + + + + Den= verton + + + + + + Denverton-v1 + + + + + + Denverton-v2 + + + + + Denverton-v3 + + + + + Dhyan= a + Dhyana-v1 + Dhyana-v2 + EPYC + EPYC-IBPB= + EPYC= -Milan + + + + + + + + + EPYC-Milan-v1 + + + + + + + + + EPYC= -Rome + EPYC-Rome-v1 + EPYC-Rome-v2 + + + + EPYC-v1 + EPYC-v2 + EPYC-v3 + Haswe= ll + + + + + + + + Haswe= ll-IBRS + + + + + + + + + Haswe= ll-noTSX + + + + + + Haswe= ll-noTSX-IBRS + + + + + + + Haswell-v1 + + + + + + + + Haswell-v2 + + + + + + Haswell-v3 + + + + + + + + + Haswell-v4 + + + + + + + Icelake-Server + + + + + + + + + + + + + + + + + + + + + + + + Icelake-Server-noTSX + + + + + + + + + + + + + + + + + + + + + + Icelake-Server-v1 + + + + + + + + + + + + + + + + + + + + + + + + Icelake-Server-v2 + + + + + + + + + + + + + + + + + + + + + + Icelake-Server-v3 + + + + + + + + + + + + + + + + + + + + + + + + Icelake-Server-v4 + + + + + + + + + + + + + + + + + + + + + + + + + + Icelake-Server-v5 + + + + + + + + + + + + + + + + + + + + + + + + + + Icelake-Server-v6 + + + + + + + + + + + + + + + + + + + + + + + + + + Ivy= Bridge + + + + Ivy= Bridge-IBRS + + + + + IvyBridge-v1 + + + + IvyBridge-v2 + + + + + K= nightsMill + + + + + + + + + + + + KnightsMill-v1 + + + + + + + + + + + + Neha= lem + Nehal= em-IBRS + + + + Nehalem-v1 + Nehalem-v2 + + + + Opt= eron_G1 + Opteron_G1-v1 + Opt= eron_G2 + Opteron_G2-v1 + Opt= eron_G3 + Opteron_G3-v1 + Opte= ron_G4 + + + + + Opteron_G4-v1 + + + + + Opte= ron_G5 + + + + + + Opteron_G5-v1 + + + + + + Penry= n + Penryn-v1 + = SandyBridge + S= andyBridge-IBRS + + + + SandyBridge-v1 + SandyBridge-v2 + + + + Skylake-Client + + + + + + + + Skylake-Client-IBRS + + + + + + + + + Skylake-Client-noTSX-IBRS + + + + + + + Skylake-Client-v1 + + + + + + + + Skylake-Client-v2 + + + + + + + + + Skylake-Client-v3 + + + + + + + Skylake-Client-v4 + + + + + + + Skylake-Server + + + + + + + + + + + + + + Skylake-Server-IBRS + + + + + + + + + + + + + + + Skylake-Server-noTSX-IBRS + + + + + + + + + + + + + Skylake-Server-v1 + + + + + + + + + + + + + + Skylake-Server-v2 + + + + + + + + + + + + + + + Skylake-Server-v3 + + + + + + + + + + + + + Skylake-Server-v4 + + + + + + + + + + + + + Skylake-Server-v5 + + + + + + + + + + + + + Sno= wridge + + + + + + + + + + + + Snowridge-v1 + + + + + + + + + + + + Snowridge-v2 + + + + + + + + + + + Snowridge-v3 + + + + + + + + + + + Snowridge-v4 + + + + + + + + + Wes= tmere + West= mere-IBRS + + + + Westmere-v1 + Westmere-v2 + + + + athlon + + + + + athlon-v1 + + + + + core= 2duo + + + + core2duo-v1 + + + + cored= uo + + + + coreduo-v1 + + + + kvm3= 2 + kvm32-v1 + kvm6= 4 + kvm64-v1 + n270 + + + + n270-v1 + + + + pe= ntium + pentium-v1 + p= entium2 + pentium2-v1 + p= entium3 + pentium3-v1 + phenom + + + + + phenom-v1 + + + + + qem= u32 + qemu32-v1 + qem= u64 + qemu64-v1 + diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index e520c7d7bc..51fec0558f 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -70,6 +70,7 @@ static int fillQemuCaps(virDomainCaps *domCaps, const char *name, const char *arch, + const char *variant, const char *machine, virQEMUDriverConfig *cfg) { @@ -81,7 +82,7 @@ fillQemuCaps(virDomainCaps *domCaps, if (fakeHostCPU(domCaps->arch) < 0) return -1; - path =3D g_strdup_printf("%s/%s_%s.xml", TEST_QEMU_CAPS_PATH, name, ar= ch); + path =3D g_strdup_printf("%s/%s_%s%s.xml", TEST_QEMU_CAPS_PATH, name, = arch, variant); if (!(qemuCaps =3D qemuTestParseCapabilitiesArch(domCaps->arch, path))) return -1; @@ -182,6 +183,7 @@ struct testData { const char *emulator; const char *machine; const char *arch; + const char *variant; virDomainVirtType type; enum testCapsType capsType; const char *capsName; @@ -209,8 +211,8 @@ test_virDomainCapsFormat(const void *opaque) case CAPS_QEMU: #if WITH_QEMU - if (fillQemuCaps(domCaps, data->capsName, data->arch, data->machin= e, - data->capsOpaque) < 0) + if (fillQemuCaps(domCaps, data->capsName, data->arch, data->varian= t, + data->machine, data->capsOpaque) < 0) return -1; #endif break; @@ -259,6 +261,7 @@ doTestQemuInternal(const char *version, .emulator =3D emulator, .machine =3D machine, .arch =3D arch, + .variant =3D variant, .type =3D type, .capsType =3D CAPS_QEMU, .capsName =3D capsName, @@ -426,6 +429,7 @@ mymain(void) .emulator =3D Emulator, \ .machine =3D Machine, \ .arch =3D Arch, \ + .variant =3D "", \ .type =3D Type, \ .capsType =3D CapsType, \ }; \ @@ -440,6 +444,7 @@ mymain(void) .emulator =3D Emulator, \ .machine =3D Machine, \ .arch =3D Arch, \ + .variant =3D "", \ .type =3D Type, \ .capsType =3D CAPS_LIBXL, \ }; \ @@ -456,6 +461,7 @@ mymain(void) .name =3D name, \ .emulator =3D Emulator, \ .arch =3D "x86_64", \ + .variant =3D "", \ .type =3D Type, \ .capsType =3D CAPS_BHYVE, \ .capsOpaque =3D BhyveCaps, \ --=20 2.48.1