From nobody Mon Feb 9 06:26:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633957371; cv=none; d=zohomail.com; s=zohoarc; b=UAh3B2fvqXi83AxDvnVcJUD6oksh/qAQtvA5Mjo6IvSs+hvoZxW+PEH4RVwYFfFZ5GBdBrOoNNihD8V0U6qb3JzbowcX2RtlFnEc01AmbwcjopPlCxi1s42L/fksdybrKxDxXU/rGYI5Nhvp4VXZle4rQaKm9HBsRSnoW6la3Cs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633957371; 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=0HnjBXnvLwrAuQFjhfPnVZn1dklEiCfc0z2/RpsGQ4E=; b=F+PB2ETBXjNMosaRoQUVwc51hblNafwVC0EIbdeJXZxL/vYonXDd2ZnwgATj39U/MYT5QMYNXWiTJEwmxBOSb4UbkYeweMFuVQU5iIi8v/v65vZJ2PameqIZRwK3jzMhr/+aDpqoV070iLoaTp0OBkcoaAi4Xt4BZihr5zTsnXk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633957371010533.5907291654813; Mon, 11 Oct 2021 06:02:51 -0700 (PDT) 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-101-AREnBVynOHiPDIdaWKzCfw-1; Mon, 11 Oct 2021 09:02:46 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8EB8E802947; Mon, 11 Oct 2021 13:02:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B2C360BF4; Mon, 11 Oct 2021 13:02:40 +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 358E11806D01; Mon, 11 Oct 2021 13:02:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19BD2J7q024829 for ; Mon, 11 Oct 2021 09:02:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4A2ED5F4E5; Mon, 11 Oct 2021 13:02:19 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id A33895F4E4 for ; Mon, 11 Oct 2021 13:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633957370; 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=0HnjBXnvLwrAuQFjhfPnVZn1dklEiCfc0z2/RpsGQ4E=; b=QX07S8LU/WtDZ8CQsL29t8nZZ+LBuuD9UWFAq+Lq08NroYHeysAnxflWk3byfWNSyMRhJA H0RuqIul0UnKPIqHFOwwENox0wW2cWukG/MLez+evEYwUDJJfVeRh1RwhlODgCMFybRh6L PZ2CBahSdM6pTwSub6h7H3cT5rOZfZA= X-MC-Unique: AREnBVynOHiPDIdaWKzCfw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 4/7] qemuxml2argvtest: Use real-caps testing for 'acpi-hotplug-bridge-disable' Date: Mon, 11 Oct 2021 15:02:09 +0200 Message-Id: <4593d3244cf0df081994ac73ba5b5806c907e40b.1633957206.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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.79 on 10.5.11.12 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-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633957396833100001 Content-Type: text/plain; charset="utf-8" We can use real example configs to prove the support without the need for using fake capabilities. Fix the recently added test cases. The negative case for 'pc-i440fx-acpi-hotplug-bridge-disable' is removed completely as there is no real qemu libvirt supports which wouldn't have the capability. Fixes: bef0f0d8be6 Signed-off-by: Peter Krempa --- ...pi-hotplug-bridge-disable.aarch64-latest.err | 1 + .../aarch64-acpi-hotplug-bridge-disable.err | 1 - ...i-hotplug-bridge-disable.x86_64-latest.args} | 15 +++++++++------ .../q35-acpi-hotplug-bridge-disable.err | 1 - ...cpi-hotplug-bridge-disable.x86_64-6.0.0.err} | 0 ...i-hotplug-bridge-disable.x86_64-latest.args} | 14 +++++++++----- tests/qemuxml2argvtest.c | 17 ++++------------- 7 files changed, 23 insertions(+), 26 deletions(-) create mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disa= ble.aarch64-latest.err delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disa= ble.err rename tests/qemuxml2argvdata/{pc-i440fx-acpi-hotplug-bridge-disable.args = =3D> pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args} (55%) delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.= err rename tests/qemuxml2argvdata/{pc-i440fx-acpi-hotplug-bridge-disable.err = =3D> q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err} (100%) rename tests/qemuxml2argvdata/{q35-acpi-hotplug-bridge-disable.args =3D> q= 35-acpi-hotplug-bridge-disable.x86_64-latest.args} (61%) diff --git a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aar= ch64-latest.err b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disabl= e.aarch64-latest.err new file mode 100644 index 0000000000..139591fce3 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-la= test.err @@ -0,0 +1 @@ +XML error: The PCI controller with index=3D'0' must be model=3D'pcie-root'= for this machine type, but model=3D'pci-root' was found instead diff --git a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err= b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err deleted file mode 100644 index 9f0a88b826..0000000000 --- a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: acpi-bridge-hotplug is not available for archit= ecture 'aarch64' diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.a= rgs b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-l= atest.args similarity index 55% rename from tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.ar= gs rename to tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_= 64-latest.args index a1e5dc85c7..26de6c81ec 100644 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args +++ b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-l= atest.args @@ -6,26 +6,29 @@ LOGNAME=3Dtest \ XDG_DATA_HOME=3D/tmp/lib/domain--1-i440fx/.local/share \ XDG_CACHE_HOME=3D/tmp/lib/domain--1-i440fx/.cache \ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-i440fx/.config \ -QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-x86_64 \ -name guest=3Di440fx,debug-threads=3Don \ -S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-i440= fx/master-key.aes \ --machine pc-i440fx-2.5,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-i440fx/master-key.aes"}' \ +-machine pc-i440fx-2.5,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,memory-= backend=3Dpc.ram \ +-cpu qemu64 \ -m 1024 \ --realtime mlock=3Doff \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}= ' \ +-overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-i440fx/monitor.= sock,server=3Don,wait=3Doff \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ -rtc base=3Dutc \ -no-shutdown \ -no-acpi \ -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=3Doff \ -boot strict=3Don \ --usb \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-audiodev id=3Daudio1,driver=3Dnone \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err b/t= ests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err deleted file mode 100644 index 8c09a3cd76..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: acpi-bridge-hotplug is not available with this = QEMU binary diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.e= rr b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err similarity index 100% rename from tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err rename to tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0= .0.err diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args b/= tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args similarity index 61% rename from tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args rename to tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-lat= est.args index 007c22c646..0c29f36738 100644 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args +++ b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.= args @@ -6,20 +6,21 @@ LOGNAME=3Dtest \ XDG_DATA_HOME=3D/tmp/lib/domain--1-q35/.local/share \ XDG_CACHE_HOME=3D/tmp/lib/domain--1-q35/.cache \ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-q35/.config \ -QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-x86_64 \ -name guest=3Dq35,debug-threads=3Don \ -S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-q35/= master-key.aes \ --machine pc-q35-2.5,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-q35/master-key.aes"}' \ +-machine pc-q35-2.5,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,memory-bac= kend=3Dpc.ram \ +-cpu qemu64 \ -m 1024 \ --realtime mlock=3Doff \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}= ' \ +-overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-q35/monitor.soc= k,server=3Don,wait=3Doff \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ -rtc base=3Dutc \ -no-shutdown \ @@ -29,5 +30,8 @@ QEMU_AUDIO_DRV=3Dnone \ -device i82801b11-bridge,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1e \ -device pci-bridge,chassis_nr=3D2,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 \ -device ioh3420,port=3D0x8,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr=3D0x1 \ +-device qemu-xhci,id=3Dusb,bus=3Dpci.3,addr=3D0x0 \ +-audiodev id=3Daudio1,driver=3Dnone \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.2,addr=3D0x1 \ +-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 0224bd1854..0fad076877 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2561,22 +2561,13 @@ mymain(void) QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4); DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-disable"); DO_TEST_CAPS_VER_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-disable", "5= .1.0"); - DO_TEST("q35-acpi-hotplug-bridge-disable", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE); - DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); - DO_TEST_PARSE_ERROR_NOCAPS("q35-acpi-hotplug-bridge-disable"); - DO_TEST_PARSE_ERROR_NOCAPS("pc-i440fx-acpi-hotplug-bridge-disable"); + DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-disable"); + DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-disable"); + DO_TEST_CAPS_VER_PARSE_ERROR("q35-acpi-hotplug-bridge-disable", "6.0.0= "); /* verify that we fail when acpi-bridge-hotplug option is specified for * archs other than x86 */ - DO_TEST_PARSE_ERROR_NOCAPS("aarch64-acpi-hotplug-bridge-disable"); + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-acpi-hotplug-bridge-disa= ble", "aarch64"); DO_TEST("q35-usb2", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, --=20 2.31.1