From nobody Mon Sep 16 19:32:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1693924089; cv=none; d=zohomail.com; s=zohoarc; b=ZdOZoGwGvfxGSdK+dFitKBIgJidyC0HSngdbm39MFa+Tw5QrNFokqBeaDvZFsejANWpFqOJIqB0j7C5PMGqE3LMs+ON4MTwFcwWM38kKNuu0mPrhrd6kMzAHA5FYmInI0qXoA1n998bPqm/1Ewab07ySwnI21cHn9QoKZeDQ1F4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693924089; h=Content-Type:Content-Transfer-Encoding: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=zxSh/+EI33yPifA4jjtf1VNMLD6uaVAK6T9W/7FAyJY=; b=Abu08dS0wyQPyTJyjbdlelybAOgZaRVLCO5JIxEzCUqfvqfbPOLRtaUtLbY6lk2iOjD9prWWkutlqg17XluPwEj+1Qj1cTSwPvs6TwkeU4hoFdR12J9wG/W1ZgG0vorNQV+me5podl8gNm/0fmaXdJ9QrktIG3RoaPuldXVHhRc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1693924089299751.4040468582241; Tue, 5 Sep 2023 07:28:09 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-609-XiMJrtiCOdG0RSuOMK6Rig-1; Tue, 05 Sep 2023 10:25:58 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4A09A1042B5F; Tue, 5 Sep 2023 14:25:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 341F620BAE72; Tue, 5 Sep 2023 14:25:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 190E91946597; Tue, 5 Sep 2023 14:25:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8B8B719465B7 for ; Tue, 5 Sep 2023 14:25:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6E5C810D14CB; Tue, 5 Sep 2023 14:25:04 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3CE11121314 for ; Tue, 5 Sep 2023 14:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693924088; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zxSh/+EI33yPifA4jjtf1VNMLD6uaVAK6T9W/7FAyJY=; b=TDb2NG3RLhlGCWVy2L/IEK3+kRbmPezdanCCS9u+4Bpucr8BkM8h+Tke6q39WItmYqqNOK Yko3OrPuxK2OEKp8I4st8L3raEcUWtZhWOv41Vb4dZUgawt+tFHn25HC1klfc7fDYFjis2 2EcXdqUNxHZ3vVX18pnduMfQUvVujHg= X-MC-Unique: XiMJrtiCOdG0RSuOMK6Rig-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 38/51] qemuxml2argvtest: Modernize test cases using 'host-model' CPU Date: Tue, 5 Sep 2023 16:24:05 +0200 Message-ID: <319d7bf04358d67a817a885d7057d29d328d04dd.1693923601.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1693924091527100001 Content-Type: text/plain; charset="utf-8" Modernize test cases using 'host-mode' cpu type, where the actual CPU doesn't isn't important. As using the host cpu from the 'latest' capabilities data would cause test churn in case the host cpu changes in the future, convert them using the overriden Haswell cpu. Signed-off-by: Peter Krempa --- ...e3.args =3D> cpu-cache-disable3.x86_64-latest.args} | 2 +- ... =3D> cpu-check-default-partial.x86_64-latest.args} | 2 +- ...args =3D> cpu-host-model-vendor.x86_64-latest.args} | 2 +- ...rgs =3D> cpu-phys-bits-emulate2.x86_64-latest.args} | 2 +- tests/qemuxml2argvtest.c | 12 ++++++++---- 5 files changed, 12 insertions(+), 8 deletions(-) rename tests/qemuxml2argvdata/{cpu-cache-disable3.args =3D> cpu-cache-disa= ble3.x86_64-latest.args} (86%) rename tests/qemuxml2argvdata/{cpu-check-default-partial.args =3D> cpu-che= ck-default-partial.x86_64-latest.args} (87%) rename tests/qemuxml2argvdata/{cpu-host-model-vendor.args =3D> cpu-host-mo= del-vendor.x86_64-latest.args} (86%) rename tests/qemuxml2argvdata/{cpu-phys-bits-emulate2.args =3D> cpu-phys-b= its-emulate2.x86_64-latest.args} (86%) diff --git a/tests/qemuxml2argvdata/cpu-cache-disable3.args b/tests/qemuxml= 2argvdata/cpu-cache-disable3.x86_64-latest.args similarity index 86% rename from tests/qemuxml2argvdata/cpu-cache-disable3.args rename to tests/qemuxml2argvdata/cpu-cache-disable3.x86_64-latest.args index 70fbf70e57..4adf20b55a 100644 --- a/tests/qemuxml2argvdata/cpu-cache-disable3.args +++ b/tests/qemuxml2argvdata/cpu-cache-disable3.x86_64-latest.args @@ -12,7 +12,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-foo/.co= nfig \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-foo/master-key.aes"}' \ -machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ -accel kvm \ --cpu core2duo,ds=3Don,acpi=3Don,ss=3Don,ht=3Don,tm=3Don,pbe=3Don,ds-cpl=3D= on,vmx=3Don,est=3Don,tm2=3Don,cx16=3Don,xtpr=3Don,lahf-lm=3Don,l3-cache=3Do= ff \ +-cpu Haswell,vme=3Don,ds=3Don,acpi=3Don,ss=3Don,ht=3Don,tm=3Don,pbe=3Don,d= tes64=3Don,monitor=3Don,ds-cpl=3Don,vmx=3Don,smx=3Don,est=3Don,tm2=3Don,xtp= r=3Don,pdcm=3Don,f16c=3Don,rdrand=3Don,pdpe1gb=3Don,abm=3Don,lahf-lm=3Don,l= 3-cache=3Doff \ -m size=3D219136k \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ -overcommit mem-lock=3Doff \ diff --git a/tests/qemuxml2argvdata/cpu-check-default-partial.args b/tests/= qemuxml2argvdata/cpu-check-default-partial.x86_64-latest.args similarity index 87% rename from tests/qemuxml2argvdata/cpu-check-default-partial.args rename to tests/qemuxml2argvdata/cpu-check-default-partial.x86_64-latest.ar= gs index e6454e5870..a92da44bd8 100644 --- a/tests/qemuxml2argvdata/cpu-check-default-partial.args +++ b/tests/qemuxml2argvdata/cpu-check-default-partial.x86_64-latest.args @@ -12,7 +12,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ -machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ -accel kvm \ --cpu core2duo,ds=3Don,acpi=3Don,ss=3Don,ht=3Don,tm=3Don,pbe=3Don,ds-cpl=3D= on,vmx=3Don,est=3Don,tm2=3Don,cx16=3Don,xtpr=3Don,lahf-lm=3Don \ +-cpu Haswell,vme=3Don,ds=3Don,acpi=3Don,ss=3Don,ht=3Don,tm=3Don,pbe=3Don,d= tes64=3Don,monitor=3Don,ds-cpl=3Don,vmx=3Don,smx=3Don,est=3Don,tm2=3Don,xtp= r=3Don,pdcm=3Don,f16c=3Don,rdrand=3Don,pdpe1gb=3Don,abm=3Don,lahf-lm=3Don \ -m size=3D219136k \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ -overcommit mem-lock=3Doff \ diff --git a/tests/qemuxml2argvdata/cpu-host-model-vendor.args b/tests/qemu= xml2argvdata/cpu-host-model-vendor.x86_64-latest.args similarity index 86% rename from tests/qemuxml2argvdata/cpu-host-model-vendor.args rename to tests/qemuxml2argvdata/cpu-host-model-vendor.x86_64-latest.args index 72c108ab88..c258a1ab36 100644 --- a/tests/qemuxml2argvdata/cpu-host-model-vendor.args +++ b/tests/qemuxml2argvdata/cpu-host-model-vendor.x86_64-latest.args @@ -12,7 +12,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ -machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ -accel tcg \ --cpu 'core2duo,vendor=3DLibvirt QEMU,ds=3Don,acpi=3Don,ss=3Don,ht=3Don,tm= =3Don,pbe=3Don,ds-cpl=3Don,vmx=3Don,est=3Don,tm2=3Don,cx16=3Don,xtpr=3Don,l= ahf-lm=3Don' \ +-cpu 'Haswell,vendor=3DLibvirt QEMU,vme=3Don,ds=3Don,acpi=3Don,ss=3Don,ht= =3Don,tm=3Don,pbe=3Don,dtes64=3Don,monitor=3Don,ds-cpl=3Don,vmx=3Don,smx=3D= on,est=3Don,tm2=3Don,xtpr=3Don,pdcm=3Don,f16c=3Don,rdrand=3Don,pdpe1gb=3Don= ,abm=3Don,lahf-lm=3Don' \ -m size=3D219136k \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ -overcommit mem-lock=3Doff \ diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-emulate2.args b/tests/qem= uxml2argvdata/cpu-phys-bits-emulate2.x86_64-latest.args similarity index 86% rename from tests/qemuxml2argvdata/cpu-phys-bits-emulate2.args rename to tests/qemuxml2argvdata/cpu-phys-bits-emulate2.x86_64-latest.args index 11c60a4d8a..92c719b553 100644 --- a/tests/qemuxml2argvdata/cpu-phys-bits-emulate2.args +++ b/tests/qemuxml2argvdata/cpu-phys-bits-emulate2.x86_64-latest.args @@ -12,7 +12,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-foo/.co= nfig \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-foo/master-key.aes"}' \ -machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ -accel kvm \ --cpu core2duo,ds=3Don,acpi=3Don,ss=3Don,ht=3Don,tm=3Don,pbe=3Don,ds-cpl=3D= on,vmx=3Don,est=3Don,tm2=3Don,cx16=3Don,xtpr=3Don,lahf-lm=3Don,phys-bits=3D= 42 \ +-cpu Haswell,vme=3Don,ds=3Don,acpi=3Don,ss=3Don,ht=3Don,tm=3Don,pbe=3Don,d= tes64=3Don,monitor=3Don,ds-cpl=3Don,vmx=3Don,smx=3Don,est=3Don,tm2=3Don,xtp= r=3Don,pdcm=3Don,f16c=3Don,rdrand=3Don,pdpe1gb=3Don,abm=3Don,lahf-lm=3Don,p= hys-bits=3D42 \ -m size=3D219136k \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ -overcommit mem-lock=3Doff \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d218b17d57..050d38c3fc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1797,7 +1797,8 @@ mymain(void) DO_TEST_CAPS_LATEST("cpu-host-model-fallback"); DO_TEST_CAPS_LATEST("cpu-host-model-nofallback"); - DO_TEST_NOCAPS("cpu-host-model-vendor"); + /* this test case uses 'cpu=3D"host-model"', run it with Haswell host = cpu to prevent test case churn */ + DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-host-model-vendor", "x86_64", ARG_C= APS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL); DO_TEST("cpu-host-passthrough", QEMU_CAPS_KVM); DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM); @@ -2471,11 +2472,13 @@ mymain(void) DO_TEST("cpu-check-full", QEMU_CAPS_KVM); DO_TEST("cpu-check-default-none", QEMU_CAPS_KVM); DO_TEST_NOCAPS("cpu-check-default-none2"); - DO_TEST("cpu-check-default-partial", QEMU_CAPS_KVM); + /* this test case uses 'cpu=3D"host-model"', run it with Haswell host = cpu to prevent test case churn */ + DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-check-default-partial", "x86_64", A= RG_CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL); DO_TEST("cpu-check-default-partial2", QEMU_CAPS_KVM); DO_TEST("cpu-cache-disable", QEMU_CAPS_KVM); - DO_TEST("cpu-cache-disable3", QEMU_CAPS_KVM); + /* this test case uses 'cpu=3D"host-model"', run it with Haswell host = cpu to prevent test case churn */ + DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-cache-disable3", "x86_64", ARG_CAPS= _HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL); DO_TEST("cpu-cache-passthrough", QEMU_CAPS_KVM); DO_TEST("cpu-cache-emulate-l3", QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("cpu-cache-emulate-l2", QEMU_CAPS_KVM); @@ -2576,7 +2579,8 @@ mymain(void) DO_TEST("cpu-phys-bits-passthrough", QEMU_CAPS_KVM); DO_TEST("cpu-phys-bits-emulate", QEMU_CAPS_KVM); - DO_TEST("cpu-phys-bits-emulate2", QEMU_CAPS_KVM); + /* this test case uses 'cpu=3D"host"', run it with Haswell host cpu to= prevent test case churn */ + DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-phys-bits-emulate2", "x86_64", ARG_= CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL); DO_TEST_PARSE_ERROR("cpu-phys-bits-passthrough2", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("cpu-phys-bits-limit"); DO_TEST_CAPS_LATEST("cpu-phys-bits-emulate-bare"); --=20 2.41.0