From patchwork Thu Jan 28 20:30:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 60761 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp711241lbb; Thu, 28 Jan 2016 12:44:31 -0800 (PST) X-Received: by 10.55.81.87 with SMTP id f84mr6244725qkb.10.1454013871375; Thu, 28 Jan 2016 12:44:31 -0800 (PST) Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com. [209.132.183.37]) by mx.google.com with ESMTPS id t138si13302082qhb.115.2016.01.28.12.44.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2016 12:44:31 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0SKgCDp062440; Thu, 28 Jan 2016 15:42:12 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0SKUP5E026868 for ; Thu, 28 Jan 2016 15:30:25 -0500 Received: from colepc.redhat.com (ovpn-113-198.phx2.redhat.com [10.3.113.198]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0SKUGKq010886; Thu, 28 Jan 2016 15:30:24 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 28 Jan 2016 15:30:14 -0500 Message-Id: <3233bb81fc4512e7b1bbd571534d02bf1fd8d24d.1454011611.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] tests: qemu: More aarch64 virtio and pci tests 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 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com Clarify the point of some of the test cases by renaming them. Add more xml2xml tests. --- ...> qemuxml2argv-aarch64-virtio-pci-default.args} | 0 ...=> qemuxml2argv-aarch64-virtio-pci-default.xml} | 0 ...2argv-aarch64-virtio-pci-manual-addresses.args} | 0 ...l2argv-aarch64-virtio-pci-manual-addresses.xml} | 0 tests/qemuxml2argvtest.c | 11 +++- .../qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml | 6 +- .../qemuxml2xmlout-aarch64-virtio-pci-default.xml | 69 ++++++++++++++++++++++ ...2xmlout-aarch64-virtio-pci-manual-addresses.xml | 53 +++++++++++++++++ tests/qemuxml2xmltest.c | 17 +++++- 9 files changed, 152 insertions(+), 4 deletions(-) rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-mmio-default-pci.args => qemuxml2argv-aarch64-virtio-pci-default.args} (100%) rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-mmio-default-pci.xml => qemuxml2argv-aarch64-virtio-pci-default.xml} (100%) rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-virtio-pci.args => qemuxml2argv-aarch64-virtio-pci-manual-addresses.args} (100%) rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-virtio-pci.xml => qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml} (100%) create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.args rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-mmio-default-pci.xml rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.args rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci.xml rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index fb08bb2..cfb46ef 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1640,13 +1640,20 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); - DO_TEST("aarch64-mmio-default-pci", + + /* Demonstrates the virtio-pci default... namely that there isn't any! + q35 style PCI controllers will be added if the binary supports it, + but virtio-mmio is always used unless PCI addresses are manually + specified. */ + DO_TEST("aarch64-virtio-pci-default", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE); - DO_TEST("aarch64-virtio-pci", + /* Example of using virtio-pci with no explicit PCI controller + but with manual PCI addresses */ + DO_TEST("aarch64-virtio-pci-manual-addresses", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml index 4a31c8b..f79c6e7 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml @@ -31,10 +31,13 @@
- + +
+ +
@@ -44,6 +47,7 @@ /dev/random +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml new file mode 100644 index 0000000..6f1c53b --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml @@ -0,0 +1,69 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + /aarch64.kernel + /aarch64.initrd + earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait + /aarch64.dtb + + + + + + + + + cortex-a53 + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + +
+ + + + +
+ + + + +
+ + +
+ + + + +
+ + + + + + + + + + + +
+ + + /dev/random +
+ + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml new file mode 100644 index 0000000..4add271 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml @@ -0,0 +1,53 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + /aarch64.kernel + /aarch64.initrd + earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait + /aarch64.dtb + + + + + + + + + cortex-a53 + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + +
+ + +
+ + + + +
+ + + + +
+ + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 174e9f9..581129c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -720,8 +720,23 @@ mymain(void) DO_TEST("shmem"); DO_TEST("smbios"); DO_TEST("smbios-multiple-type2"); - DO_TEST("aarch64-aavmf-virtio-mmio"); + DO_TEST_FULL("aarch64-aavmf-virtio-mmio", WHEN_ACTIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, + QEMU_CAPS_DEVICE_VIRTIO_MMIO, + QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_FULL("aarch64-virtio-pci-default", WHEN_ACTIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, + QEMU_CAPS_DEVICE_VIRTIO_MMIO, + QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_FULL("aarch64-virtio-pci-manual-addresses", WHEN_ACTIVE, + QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, + QEMU_CAPS_DEVICE_VIRTIO_MMIO, + QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-gic"); DO_TEST("aarch64-gicv3");