From patchwork Tue Feb 9 15:59:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 61565 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2127582lbl; Tue, 9 Feb 2016 08:02:08 -0800 (PST) X-Received: by 10.129.27.6 with SMTP id b6mr18687266ywb.205.1455033714278; Tue, 09 Feb 2016 08:01:54 -0800 (PST) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id i123si9457377yba.186.2016.02.09.08.01.53 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 09 Feb 2016 08:01:54 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 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 mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u19FxItG032713; Tue, 9 Feb 2016 10:59:18 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u19FxCfK011129 for ; Tue, 9 Feb 2016 10:59:12 -0500 Received: from colepc.redhat.com (ovpn-113-172.phx2.redhat.com [10.3.113.172]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u19Fx6LR027336; Tue, 9 Feb 2016 10:59:11 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 9 Feb 2016 10:59:02 -0500 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-loop: libvir-list@redhat.com Cc: mkletzan@redhat.com Subject: [libvirt] [PATCH v2 6/6] 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 92043d2..3c7693b 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1650,13 +1650,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 a06aa4d..8c71e9b 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");