From nobody Fri Dec 19 20:37:35 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 1548692403117757.0073771044005; Mon, 28 Jan 2019 08:20:03 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id CAAC687623; Mon, 28 Jan 2019 16:19:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8636353B33; Mon, 28 Jan 2019 16:19:58 +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 3B0A23F60B; Mon, 28 Jan 2019 16:19:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0SGJX6X018239 for ; Mon, 28 Jan 2019 11:19:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id BA48282ED3; Mon, 28 Jan 2019 16:19:33 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41D076608B for ; Mon, 28 Jan 2019 16:19:33 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 28 Jan 2019 17:18:54 +0100 Message-Id: <6338eb1f1fe2b45ad64d4ed7643154adef4d4e74.1548692131.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 25/32] tests: qemuxml2argv: Add CDROM disks for all untested buses 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: , 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 28 Jan 2019 16:20:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add full and empty cdroms on 'usb', 'virtio', and 'sd' bus to have test coverage. Note that this does not guarantee that qemu will accept them. Signed-off-by: Peter Krempa --- .../disk-cdrom-bus-other.x86_64-latest.args | 45 +++++++++++++ .../qemuxml2argvdata/disk-cdrom-bus-other.xml | 58 +++++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../disk-cdrom-bus-other.xml | 64 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 169 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-late= st.args create mode 100644 tests/qemuxml2argvdata/disk-cdrom-bus-other.xml create mode 100644 tests/qemuxml2xmloutdata/disk-cdrom-bus-other.xml diff --git a/tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-latest.args= b/tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-latest.args new file mode 100644 index 0000000000..c38819fac0 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-latest.args @@ -0,0 +1,45 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-drive file=3D/root/boot.iso,format=3Draw,if=3Dnone,id=3Ddrive-usb-disk0,m= edia=3Dcdrom,\ +readonly=3Don \ +-device usb-storage,bus=3Dusb.0,port=3D1,drive=3Ddrive-usb-disk0,id=3Dusb-= disk0,\ +removable=3Doff \ +-drive if=3Dnone,id=3Ddrive-usb-disk1,media=3Dcdrom \ +-device usb-storage,bus=3Dusb.0,port=3D2,drive=3Ddrive-usb-disk1,id=3Dusb-= disk1,\ +removable=3Doff \ +-drive file=3D/root/boot1.iso,format=3Draw,if=3Dnone,id=3Ddrive-virtio-dis= k0,\ +media=3Dcdrom,readonly=3Don,cache=3Dnone \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x2,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0,write-cache=3Don \ +-drive if=3Dnone,id=3Ddrive-virtio-disk1,media=3Dcdrom \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-vir= tio-disk1,\ +id=3Dvirtio-disk1,write-cache=3Don \ +-drive file=3D/root/boot2.iso,format=3Draw,if=3Dsd,index=3D2,media=3Dcdrom= ,readonly=3Don \ +-drive if=3Dsd,index=3D3,media=3Dcdrom \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-cdrom-bus-other.xml b/tests/qemuxm= l2argvdata/disk-cdrom-bus-other.xml new file mode 100644 index 0000000000..2ed86b0900 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-cdrom-bus-other.xml @@ -0,0 +1,58 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + This test is meant for testing CDROMS with buses which don'= t really support them + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ff261149f5..a71f8b85a1 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1011,6 +1011,7 @@ mymain(void) DO_TEST("disk-cdrom", NONE); DO_TEST_CAPS_VER("disk-cdrom", "2.12.0"); DO_TEST_CAPS_LATEST("disk-cdrom"); + DO_TEST_CAPS_LATEST("disk-cdrom-bus-other"); DO_TEST("disk-iscsi", NONE); DO_TEST("disk-cdrom-network", QEMU_CAPS_KVM); DO_TEST_CAPS_VER("disk-cdrom-network", "2.12.0"); diff --git a/tests/qemuxml2xmloutdata/disk-cdrom-bus-other.xml b/tests/qemu= xml2xmloutdata/disk-cdrom-bus-other.xml new file mode 100644 index 0000000000..a9f2806777 --- /dev/null +++ b/tests/qemuxml2xmloutdata/disk-cdrom-bus-other.xml @@ -0,0 +1,64 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + This test is meant for testing CDROMS with buses which don&= apos;t really support them + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 899afead51..99b7d04bef 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -346,6 +346,7 @@ mymain(void) DO_TEST("qemu-ns-no-env", NONE); DO_TEST("disk-aio", NONE); DO_TEST("disk-cdrom", NONE); + DO_TEST("disk-cdrom-bus-other", NONE); DO_TEST("disk-floppy", NONE); DO_TEST("disk-usb-device", NONE); DO_TEST("disk-virtio", NONE); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list