From nobody Sun Feb 8 23:59:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1680262024; cv=none; d=zohomail.com; s=zohoarc; b=HfCeeIRLHuhXJCDTYbmY0gzhnEviS4OyKbBvDo4ni5EyTQzVatBkAN6YrDig30QfCTF8kUHEguBwgT4VJY4doRgsLqW33b1Vh1fOYVBd86wo5La1KBYB2zcTXJAAYsN8JlXzT+Q4pgOzB1S01Dqp29LwcD6oP43/BPTly9pOeLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680262024; 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=92T89FPHo+MwtcaWFa6P5qCdnPXWudmq8Q8b9XHvRHg=; b=jre6wQljpUT0xE5E0693/9pHgJollot5mIIb1BYvzU5nwKXksjQyiORyY/VRUKa4mMdjHgvzQGPadExeV8DsmEZBwDe0OIvAhduz6zRv5G42MP2zsQvHiCmNnw1MqLXlmn073VfwmX1QXK53diJLe2ZAXvRmzUCkGCfo9H/xIAw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1680262024739232.52654015934138; Fri, 31 Mar 2023 04:27:04 -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-84-NyS_XtYTMP-PXTy-qwArzQ-1; Fri, 31 Mar 2023 07:26:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3EF66280BF79; Fri, 31 Mar 2023 11:26:22 +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 19A7614171BA; Fri, 31 Mar 2023 11:26:22 +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 A888A1946A52; Fri, 31 Mar 2023 11:26:21 +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 39A0A19465BC for ; Fri, 31 Mar 2023 11:26:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1DFA71121315; Fri, 31 Mar 2023 11:26:20 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8566D1121314 for ; Fri, 31 Mar 2023 11:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680262023; 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=92T89FPHo+MwtcaWFa6P5qCdnPXWudmq8Q8b9XHvRHg=; b=Vn4ZwXrR6T8QPkRGWsKHuFvI5OQgK6Qdmd+E4xUh2QEDS/jHBhF1vsBAStVCakgYBm0xJD IESJIN0RMnTTrio/4Z5XbzPs4uaj4XrwsbuNi5Rcyitvst9BGcj9E71pYhq+6crcJZhjgE QwTQbXLh8uOiONmfUNyvFb7uQP/I3Ow= X-MC-Unique: NyS_XtYTMP-PXTy-qwArzQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/21] qemuxml2argvtest: Use real capabilities in tests for picking the aarch64 GIC version Date: Fri, 31 Mar 2023 13:25:57 +0200 Message-Id: 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.7 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: 1680262026440100002 Content-Type: text/plain; charset="utf-8" Convert 'aarch64-gic-default' and 'aarch64-gic-none' cases to use real capabilities both latest and locked to 4.2.0 to show what would happen with a real qemu. Note that the qemuTestSetHostArch() calls are needed as real caps override the setting once used. Once we convert all tests to real data this can be dropped. Signed-off-by: Peter Krempa --- ...=3D> aarch64-gic-default.aarch64-4.2.0.args} | 3 +- .../aarch64-gic-default.aarch64-latest.args | 32 +++++++++++++++++++ ...gs =3D> aarch64-gic-none.aarch64-4.2.0.args} | 3 +- .../aarch64-gic-none.aarch64-latest.args | 32 +++++++++++++++++++ tests/qemuxml2argvtest.c | 26 ++++++++++++--- 5 files changed, 90 insertions(+), 6 deletions(-) rename tests/qemuxml2argvdata/{aarch64-gic-default.args =3D> aarch64-gic-d= efault.aarch64-4.2.0.args} (86%) create mode 100644 tests/qemuxml2argvdata/aarch64-gic-default.aarch64-late= st.args rename tests/qemuxml2argvdata/{aarch64-gic-none.args =3D> aarch64-gic-none= .aarch64-4.2.0.args} (86%) create mode 100644 tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.= args diff --git a/tests/qemuxml2argvdata/aarch64-gic-default.args b/tests/qemuxm= l2argvdata/aarch64-gic-default.aarch64-4.2.0.args similarity index 86% rename from tests/qemuxml2argvdata/aarch64-gic-default.args rename to tests/qemuxml2argvdata/aarch64-gic-default.aarch64-4.2.0.args index 07dd297842..34c9f79ea1 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-default.args +++ b/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-4.2.0.args @@ -10,7 +10,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -name guest=3Daarch64test,debug-threads=3Don \ -S \ -object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/d= omain--1-aarch64test/master-key.aes \ --machine virt,usb=3Doff,gic-version=3D2,dump-guest-core=3Doff \ +-machine virt-4.2,usb=3Doff,gic-version=3D3,dump-guest-core=3Doff \ -accel kvm \ -cpu host \ -m 1024 \ @@ -27,4 +27,5 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -no-acpi \ -boot strict=3Don \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-latest.args= b/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-latest.args new file mode 100644 index 0000000000..0d7a1c259a --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=3Daarch64test,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=3Doff,gic-version=3D3,dump-guest-core=3Doff,memory-backe= nd=3Dmach-virt.ram \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073= 741824}' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-gic-none.args b/tests/qemuxml2a= rgvdata/aarch64-gic-none.aarch64-4.2.0.args similarity index 86% rename from tests/qemuxml2argvdata/aarch64-gic-none.args rename to tests/qemuxml2argvdata/aarch64-gic-none.aarch64-4.2.0.args index 07dd297842..34c9f79ea1 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-none.args +++ b/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-4.2.0.args @@ -10,7 +10,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -name guest=3Daarch64test,debug-threads=3Don \ -S \ -object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/d= omain--1-aarch64test/master-key.aes \ --machine virt,usb=3Doff,gic-version=3D2,dump-guest-core=3Doff \ +-machine virt-4.2,usb=3Doff,gic-version=3D3,dump-guest-core=3Doff \ -accel kvm \ -cpu host \ -m 1024 \ @@ -27,4 +27,5 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -no-acpi \ -boot strict=3Don \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args b/= tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args new file mode 100644 index 0000000000..0d7a1c259a --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=3Daarch64test,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=3Doff,gic-version=3D3,dump-guest-core=3Doff,memory-backe= nd=3Dmach-virt.ram \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073= 741824}' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2e72ebf8e3..772caca47e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2390,8 +2390,17 @@ mymain(void) DO_TEST("aarch64-cpu-passthrough", QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-none", GIC_NONE, - QEMU_CAPS_KVM); + DO_TEST_FULL("aarch64-gic-none", ".aarch64-4.2.0", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "4.2.0", + ARG_END); + DO_TEST_FULL("aarch64-gic-none", ".aarch64-latest", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "latest", + ARG_END); + qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2, QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3, @@ -2399,8 +2408,17 @@ mymain(void) DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH, QEMU_CAPS_KVM); DO_TEST_FULL("aarch64-gic-none-tcg", "", ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_GIC("aarch64-gic-default", GIC_NONE, - QEMU_CAPS_KVM); + DO_TEST_FULL("aarch64-gic-default", ".aarch64-4.2.0", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "4.2.0", + ARG_END); + DO_TEST_FULL("aarch64-gic-default", ".aarch64-latest", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "latest", + ARG_END); + qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); DO_TEST_GIC("aarch64-gic-default-v2", GIC_V2, QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-default-v3", GIC_V3, --=20 2.39.2