From nobody Wed May 14 23:13:47 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 151922251553783.80102174993544; Wed, 21 Feb 2018 06:15:15 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 787666E764; Wed, 21 Feb 2018 14:15:13 +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 0703A6090C; Wed, 21 Feb 2018 14:15:13 +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 0B5A718033EB; Wed, 21 Feb 2018 14:15:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LEF82W001831 for ; Wed, 21 Feb 2018 09:15:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id A40F810A970C; Wed, 21 Feb 2018 14:15:08 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.163]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D37B10A970B for ; Wed, 21 Feb 2018 14:15:07 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:14:50 +0100 Message-Id: <20180221141501.19866-2-abologna@redhat.com> In-Reply-To: <20180221141501.19866-1-abologna@redhat.com> References: <20180221141501.19866-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 01/12] tests: Add some tests for PCI controller options 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 21 Feb 2018 14:15:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The input configurations set all existing options for all PCI controllers, even those that are not valid for the controller. As we implement validation for PCI controller options, we expect these test to start failing. Signed-off-by: Andrea Bolognani --- .../i440fx-controllers-pciopts.args | 24 +++++++ .../i440fx-controllers-pciopts.xml | 36 ++++++++++ .../pseries-controllers-pciopts.args | 22 +++++++ .../pseries-controllers-pciopts.xml | 35 ++++++++++ .../qemuxml2argvdata/q35-controllers-pciopts.args | 28 ++++++++ tests/qemuxml2argvdata/q35-controllers-pciopts.xml | 60 +++++++++++++++++ tests/qemuxml2argvtest.c | 17 +++++ .../i440fx-controllers-pciopts.xml | 45 +++++++++++++ .../pseries-controllers-pciopts.xml | 43 ++++++++++++ .../qemuxml2xmloutdata/q35-controllers-pciopts.xml | 76 ++++++++++++++++++= ++++ tests/qemuxml2xmltest.c | 17 +++++ 11 files changed, 403 insertions(+) create mode 100644 tests/qemuxml2argvdata/i440fx-controllers-pciopts.args create mode 100644 tests/qemuxml2argvdata/i440fx-controllers-pciopts.xml create mode 100644 tests/qemuxml2argvdata/pseries-controllers-pciopts.args create mode 100644 tests/qemuxml2argvdata/pseries-controllers-pciopts.xml create mode 100644 tests/qemuxml2argvdata/q35-controllers-pciopts.args create mode 100644 tests/qemuxml2argvdata/q35-controllers-pciopts.xml create mode 100644 tests/qemuxml2xmloutdata/i440fx-controllers-pciopts.xml create mode 100644 tests/qemuxml2xmloutdata/pseries-controllers-pciopts.xml create mode 100644 tests/qemuxml2xmloutdata/q35-controllers-pciopts.xml diff --git a/tests/qemuxml2argvdata/i440fx-controllers-pciopts.args b/tests= /qemuxml2argvdata/i440fx-controllers-pciopts.args new file mode 100644 index 0000000000..d85fae5c96 --- /dev/null +++ b/tests/qemuxml2argvdata/i440fx-controllers-pciopts.args @@ -0,0 +1,24 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest \ +-S \ +-M pc \ +-m 1024 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-numa node,nodeid=3D0,cpus=3D0,mem=3D1024 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-guest/monitor.s= ock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-no-acpi \ +-boot c \ +-global i440FX-pcihost.pci-hole64-size=3D1024K \ +-device pci-bridge,chassis_nr=3D2,id=3Dpci.1,bus=3Dpci.0,addr=3D0x3 \ +-device pxb,bus_nr=3D3,id=3Dpci.2,numa_node=3D0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/i440fx-controllers-pciopts.xml b/tests/= qemuxml2argvdata/i440fx-controllers-pciopts.xml new file mode 100644 index 0000000000..06008b7338 --- /dev/null +++ b/tests/qemuxml2argvdata/i440fx-controllers-pciopts.xml @@ -0,0 +1,36 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1 + + hvm + + + + + + + + /usr/bin/qemu-system-x86_64 + + + + 1024 + + + + + 0 + + + + + + 0 + + + + + + diff --git a/tests/qemuxml2argvdata/pseries-controllers-pciopts.args b/test= s/qemuxml2argvdata/pseries-controllers-pciopts.args new file mode 100644 index 0000000000..5f1edfc833 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-controllers-pciopts.args @@ -0,0 +1,22 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name guest \ +-S \ +-M pseries \ +-m 1024 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-numa node,nodeid=3D0,cpus=3D0,mem=3D1024 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-guest/monitor.s= ock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-boot c \ +-device spapr-pci-host-bridge,index=3D1,id=3Dpci.1,numa_node=3D0 \ +-device pci-bridge,chassis_nr=3D3,id=3Dpci.2,bus=3Dpci.0,addr=3D0x1 diff --git a/tests/qemuxml2argvdata/pseries-controllers-pciopts.xml b/tests= /qemuxml2argvdata/pseries-controllers-pciopts.xml new file mode 100644 index 0000000000..088c7159c3 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-controllers-pciopts.xml @@ -0,0 +1,35 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1 + + hvm + + + + + + + + /usr/bin/qemu-system-ppc64 + + + + + + + + 0 + + + + + + 0 + + + + + + diff --git a/tests/qemuxml2argvdata/q35-controllers-pciopts.args b/tests/qe= muxml2argvdata/q35-controllers-pciopts.args new file mode 100644 index 0000000000..44259f5027 --- /dev/null +++ b/tests/qemuxml2argvdata/q35-controllers-pciopts.args @@ -0,0 +1,28 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest \ +-S \ +-M q35 \ +-m 1024 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-numa node,nodeid=3D0,cpus=3D0,mem=3D1024 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-guest/monitor.s= ock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-no-acpi \ +-boot c \ +-global q35-pcihost.pci-hole64-size=3D1024K \ +-device i82801b11-bridge,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1e \ +-device pci-bridge,chassis_nr=3D3,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 \ +-device pxb-pcie,bus_nr=3D4,id=3Dpci.3,numa_node=3D0,bus=3Dpcie.0,addr=3D0= x2 \ +-device pcie-root-port,port=3D0x5,chassis=3D5,id=3Dpci.4,bus=3Dpcie.0,addr= =3D0x3 \ +-device x3130-upstream,id=3Dpci.5,bus=3Dpci.4,addr=3D0x0 \ +-device xio3130-downstream,port=3D0x7,chassis=3D7,id=3Dpci.6,bus=3Dpci.5,a= ddr=3D0x0 diff --git a/tests/qemuxml2argvdata/q35-controllers-pciopts.xml b/tests/qem= uxml2argvdata/q35-controllers-pciopts.xml new file mode 100644 index 0000000000..f5b8d1e355 --- /dev/null +++ b/tests/qemuxml2argvdata/q35-controllers-pciopts.xml @@ -0,0 +1,60 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1 + + hvm + + + + + + + + /usr/bin/qemu-system-x86_64 + + + + 1024 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 688846b9b4..9015eb5fb3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2436,6 +2436,23 @@ mymain(void) QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_PXB_PCIE); =20 + DO_TEST("i440fx-controllers-pciopts", + QEMU_CAPS_I440FX_PCI_HOLE64_SIZE, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PXB); + DO_TEST("q35-controllers-pciopts", + QEMU_CAPS_Q35_PCI_HOLE64_SIZE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PXB_PCIE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_X3130_UPSTREAM, + QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM); + DO_TEST("pseries-controllers-pciopts", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE, + QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST("hostdev-scsi-lsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI, QEMU_CAPS_DEVICE_SCSI_GENERIC); diff --git a/tests/qemuxml2xmloutdata/i440fx-controllers-pciopts.xml b/test= s/qemuxml2xmloutdata/i440fx-controllers-pciopts.xml new file mode 100644 index 0000000000..d171d13705 --- /dev/null +++ b/tests/qemuxml2xmloutdata/i440fx-controllers-pciopts.xml @@ -0,0 +1,45 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + 1024 + + + + + 0 + +
+ + + + + 0 + +
+ + + + + + + diff --git a/tests/qemuxml2xmloutdata/pseries-controllers-pciopts.xml b/tes= ts/qemuxml2xmloutdata/pseries-controllers-pciopts.xml new file mode 100644 index 0000000000..bbe360e25d --- /dev/null +++ b/tests/qemuxml2xmloutdata/pseries-controllers-pciopts.xml @@ -0,0 +1,43 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + + + + + + + + 0 + + + + + + 0 + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/q35-controllers-pciopts.xml b/tests/q= emuxml2xmloutdata/q35-controllers-pciopts.xml new file mode 100644 index 0000000000..5ef7aa564c --- /dev/null +++ b/tests/qemuxml2xmloutdata/q35-controllers-pciopts.xml @@ -0,0 +1,76 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + 1024 + + + + + 0 + +
+ + + + + 0 + +
+ + + + + 0 + +
+ + + + + 0 + +
+ + + + + 0 + +
+ + + + + 0 + +
+ + + +
+ + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 0eb9e6c77a..7b8a160788 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1102,6 +1102,23 @@ mymain(void) QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_HDA_DUPLEX); =20 + DO_TEST("i440fx-controllers-pciopts", + QEMU_CAPS_I440FX_PCI_HOLE64_SIZE, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PXB); + DO_TEST("q35-controllers-pciopts", + QEMU_CAPS_Q35_PCI_HOLE64_SIZE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PXB_PCIE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_X3130_UPSTREAM, + QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM); + DO_TEST("pseries-controllers-pciopts", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE, + QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST("hostdev-scsi-vhost-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_VIRTIO_CCW); --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list