From nobody Sun Feb 8 05:40:56 2026 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com 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 1653079647828272.7441696883999; Fri, 20 May 2022 13:47:27 -0700 (PDT) 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-450-Iy6BtDDGMsW31FkPxSfyTQ-1; Fri, 20 May 2022 16:47:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C1E52949BC6; Fri, 20 May 2022 20:47:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 049A12026D6A; Fri, 20 May 2022 20:47:23 +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 D4D881947052; Fri, 20 May 2022 20:47:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6B234194704C for ; Fri, 20 May 2022 20:47:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3CD4E7AD5; Fri, 20 May 2022 20:47:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3887D7C4F for ; Fri, 20 May 2022 20:47:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1B384380450A for ; Fri, 20 May 2022 20:47:21 +0000 (UTC) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-610-QQHBWkxoPLWDzptr6O-ljg-1; Fri, 20 May 2022 16:47:19 -0400 Received: by mail-oi1-f179.google.com with SMTP id v9so6626106oie.5 for ; Fri, 20 May 2022 13:47:19 -0700 (PDT) Received: from balboa.ibmuc.com ([191.193.151.26]) by smtp.gmail.com with ESMTPSA id o192-20020a4a2cc9000000b0035eb4e5a6cfsm1464343ooo.37.2022.05.20.13.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 13:47:18 -0700 (PDT) X-MC-Unique: Iy6BtDDGMsW31FkPxSfyTQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: QQHBWkxoPLWDzptr6O-ljg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W4gJOhThJrEwYsEp6GWHmVGU6woNUiYRSUUIy476CtE=; b=yeRi8kzDAhOwVPHfcFZu/m8+S45CM5KMVV+C9ReqWPSAHUQb7VHbrcLxn2l/pLuvof wUqJ13J5cv7kP484pJcgwuEHuo7fqeR8w+CHnS9P2LAantfUfryqIs2iWl1qk7eABlD+ yt9kjXX2bPp3i2jyb/lGwhlhV8rqJQH71IPgRVCP1fflzstabFb4MTkljz9cPqyFy6R/ RdN9W8o4Fbcsztc72eQVVDyTcevzkfgxMXxVqjTkGEKfDaJrlfvjNWrGesQi8B4o5WgC bb+rcG05UEldW7NXBADTKkHncaaNbWgsToxf77R5m7I3oz99KdddX1DUEbYmuTXIKHqn UWjQ== X-Gm-Message-State: AOAM5330fL7h7Ig9USNGq2ic1tDlOP4//GsDqGSzysjctDuvFrvRHRkT AvN+pp/ocen9PNFV+0g5QkFXXDU0ax0= X-Google-Smtp-Source: ABdhPJzmCkAa7tk4jfadPCgfuwYJs9sGeV6/3OfocKYv/gLzgcrjSvc7GOdfXgHUtNmUOO9nAIBc8g== X-Received: by 2002:a05:6808:13cd:b0:328:a194:1d15 with SMTP id d13-20020a05680813cd00b00328a1941d15mr6132806oiw.186.1653079638507; Fri, 20 May 2022 13:47:18 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 3/3] qemuxml2argvtest.c: use CAPS_ARCH_LATEST() with pseries-cpu-compat-power9 Date: Fri, 20 May 2022 17:47:04 -0300 Message-Id: <20220520204704.1290007-4-danielhb413@gmail.com> In-Reply-To: <20220520204704.1290007-1-danielhb413@gmail.com> References: <20220520204704.1290007-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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: , Cc: danielhb413@gmail.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1653079648545100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Use the newly added ARG_CAPS_HOST_CPU_MODEL to set which host CPU we expect the test to use - the test should fail when using a POWER8 host cpu but complete when using a POWER9 host cpu. Two new macros were added because we will be adding similar tests in the near future when adding support for the Power10 chip. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Martin Kletzander --- ...eries-cpu-compat-power9.ppc64-latest.args} | 12 ++++++---- ...series-cpu-compat-power9.ppc64-latest.err} | 0 tests/qemuxml2argvtest.c | 23 +++++++++++-------- 3 files changed, 20 insertions(+), 15 deletions(-) rename tests/qemuxml2argvdata/{pseries-cpu-compat-power9.args =3D> pseries= -cpu-compat-power9.ppc64-latest.args} (60%) rename tests/qemuxml2argvdata/{pseries-cpu-compat-power9.err =3D> pseries-= cpu-compat-power9.ppc64-latest.err} (100%) diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power9.args b/tests/= qemuxml2argvdata/pseries-cpu-compat-power9.ppc64-latest.args similarity index 60% rename from tests/qemuxml2argvdata/pseries-cpu-compat-power9.args rename to tests/qemuxml2argvdata/pseries-cpu-compat-power9.ppc64-latest.args index 233e92f206..f458999291 100644 --- a/tests/qemuxml2argvdata/pseries-cpu-compat-power9.args +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power9.ppc64-latest.args @@ -6,15 +6,15 @@ LOGNAME=3Dtest \ XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-ppc64 \ -name guest=3DQEMUGuest1,debug-threads=3Don \ -S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest1/master-key.aes \ --machine pseries,usb=3Doff,dump-guest-core=3Doff,max-cpu-compat=3Dpower9 \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pseries,usb=3Doff,dump-guest-core=3Doff,max-cpu-compat=3Dpower9,m= emory-backend=3Dppc_spapr.ram \ -accel kvm \ -cpu host \ -m 256 \ +-object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":2684= 35456}' \ -overcommit mem-lock=3Doff \ -smp 4,sockets=3D4,cores=3D1,threads=3D1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ @@ -26,7 +26,9 @@ QEMU_AUDIO_DRV=3Dnone \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --usb \ +-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \ -chardev pty,id=3Dcharserial0 \ --device spapr-vty,chardev=3Dcharserial0,id=3Dserial0,reg=3D805306368 \ +-device '{"driver":"spapr-vty","chardev":"charserial0","id":"serial0","reg= ":805306368}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power9.err b/tests/q= emuxml2argvdata/pseries-cpu-compat-power9.ppc64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/pseries-cpu-compat-power9.err rename to tests/qemuxml2argvdata/pseries-cpu-compat-power9.ppc64-latest.err diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 96bc7aadeb..5ae245d254 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -980,6 +980,15 @@ mymain(void) # define DO_TEST_CAPS_LATEST_PPC64(name) \ DO_TEST_CAPS_ARCH_LATEST(name, "ppc64") =20 +# define DO_TEST_CAPS_LATEST_PPC64_HOSTCPU(name, hostcpu) \ + DO_TEST_CAPS_ARCH_LATEST_FULL(name, "ppc64", \ + ARG_CAPS_HOST_CPU_MODEL, hostcpu) + +# define DO_TEST_CAPS_LATEST_PPC64_HOSTCPU_FAILURE(name, hostcpu) \ + DO_TEST_CAPS_ARCH_LATEST_FULL(name, "ppc64", \ + ARG_CAPS_HOST_CPU_MODEL, hostcpu, \ + ARG_FLAGS, FLAG_EXPECT_FAILURE) + # define DO_TEST_CAPS_ARCH_LATEST_FAILURE(name, arch) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, \ ARG_FLAGS, FLAG_EXPECT_FAILURE) @@ -2226,16 +2235,10 @@ mymain(void) DO_TEST("pseries-cpu-le", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_DEVICE_SPAPR_VTY); - DO_TEST_FAILURE("pseries-cpu-compat-power9", - QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_KVM); - - qemuTestSetHostCPU(&driver, driver.hostarch, qemuTestGetCPUDef(QEMU_CP= U_DEF_POWER9)); - DO_TEST("pseries-cpu-compat-power9", - QEMU_CAPS_KVM, - QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_DEVICE_SPAPR_VTY); - qemuTestSetHostCPU(&driver, driver.hostarch, NULL); + DO_TEST_CAPS_LATEST_PPC64_HOSTCPU_FAILURE("pseries-cpu-compat-power9", + QEMU_CPU_DEF_POWER8); + DO_TEST_CAPS_LATEST_PPC64_HOSTCPU("pseries-cpu-compat-power9", + QEMU_CPU_DEF_POWER9); =20 qemuTestSetHostArch(&driver, VIR_ARCH_NONE); =20 --=20 2.32.0