From nobody Wed May 14 17:03:53 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 152448453970769.64435344844696; Mon, 23 Apr 2018 04:55:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9344F80468; Mon, 23 Apr 2018 11:55:37 +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 A14EC177ED; Mon, 23 Apr 2018 11:55:36 +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 1C47D180596E; Mon, 23 Apr 2018 11:55:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3NBsfB7030895 for ; Mon, 23 Apr 2018 07:54:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1BD0A7C28; Mon, 23 Apr 2018 11:54:41 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-216.brq.redhat.com [10.40.204.216]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7494083B8B for ; Mon, 23 Apr 2018 11:54:37 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 13:54:34 +0200 Message-Id: <20180423115434.23835-1-abologna@redhat.com> In-Reply-To: <20180420154431.31536-1-abologna@redhat.com> References: <20180420154431.31536-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/3] tests: Make sure rom.file='' for PCI devices keeps working 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 23 Apr 2018 11:55:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Even though we just introduced the rom.enabled attribute to properly cover the use case, there might be guests out there that use the only previously available way of disabling PCI ROM loading by not opting in to schema validation. To make sure such guests will keep working going forward, introduce a test case covering the legacy workaround. Signed-off-by: Andrea Bolognani --- .../qemuxml2argvdata/pci-rom-disabled-invalid.args | 1 + .../qemuxml2argvdata/pci-rom-disabled-invalid.xml | 25 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../pci-rom-disabled-invalid.xml | 29 ++++++++++++++++++= ++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 57 insertions(+) create mode 120000 tests/qemuxml2argvdata/pci-rom-disabled-invalid.args create mode 100644 tests/qemuxml2argvdata/pci-rom-disabled-invalid.xml create mode 100644 tests/qemuxml2xmloutdata/pci-rom-disabled-invalid.xml diff --git a/tests/qemuxml2argvdata/pci-rom-disabled-invalid.args b/tests/q= emuxml2argvdata/pci-rom-disabled-invalid.args new file mode 120000 index 0000000000..0dffe3c624 --- /dev/null +++ b/tests/qemuxml2argvdata/pci-rom-disabled-invalid.args @@ -0,0 +1 @@ +pci-rom-disabled.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/pci-rom-disabled-invalid.xml b/tests/qe= muxml2argvdata/pci-rom-disabled-invalid.xml new file mode 100644 index 0000000000..5ef58d03ae --- /dev/null +++ b/tests/qemuxml2argvdata/pci-rom-disabled-invalid.xml @@ -0,0 +1,25 @@ + + guest + c7a5fdbd-edaf-9466-926a-d65c16db1809 + 219100 + 1 + + hvm + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ae9893a84e..5b3bd4a996 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1555,6 +1555,7 @@ mymain(void) QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST("pci-rom", NONE); DO_TEST("pci-rom-disabled", NONE); + DO_TEST("pci-rom-disabled-invalid", NONE); =20 DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0, GIC_NONE, NONE); DO_TEST_FULL("restore-v2-fd", "stdio", 7, 0, 0, GIC_NONE, NONE); diff --git a/tests/qemuxml2xmloutdata/pci-rom-disabled-invalid.xml b/tests/= qemuxml2xmloutdata/pci-rom-disabled-invalid.xml new file mode 100644 index 0000000000..745d19d8ad --- /dev/null +++ b/tests/qemuxml2xmloutdata/pci-rom-disabled-invalid.xml @@ -0,0 +1,29 @@ + + guest + c7a5fdbd-edaf-9466-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + +
+ + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 6c1f0b0fa6..4b5aa2315e 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -475,6 +475,7 @@ mymain(void) DO_TEST("hostdev-mdev-precreated", NONE); DO_TEST("pci-rom", NONE); DO_TEST("pci-rom-disabled", NONE); + DO_TEST("pci-rom-disabled-invalid", NONE); DO_TEST("pci-serial-dev-chardev", NONE); =20 DO_TEST("encrypted-disk", NONE); --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list