1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

qemuxml2xmloutdata: Workaround wrong detection of 'disk-cdrom-empty-network-invalid' in virschematest

The 'disk-cdrom-empty-network-invalid' is a special case were the input
XML is invalid according to the schema, but after processing a valid XML
is produced.

This corner case doesn't play well with 'virschematest' which uses the
file suffix to determine whether the file is invalid.

Upcoming patch will change the 'virschematest' condition, which would
start detecting this XML as invalid.

Use the '-active'/'-inactive' suffix for the file, which is possible
with qemuxml2xmltest so that an upcoming patch will not cause test
failure.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-08-15 14:43:20 +02:00
parent f83f864230
commit 72a6c2ad9f
3 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1 @@
disk-cdrom-empty-network-invalid-active.x86_64-latest.xml

View File

@ -287,6 +287,9 @@ mymain(void)
DO_TEST_NOCAPS("disk-aio");
DO_TEST_CAPS_LATEST("disk-aio-io_uring");
DO_TEST_NOCAPS("disk-cdrom");
/* The 'disk-cdrom-empty-network-invalid' test case uses separate
* '-active'/'-inactive' output files to work around 'virschematest'
* thinking the output file is invalid XML */
DO_TEST_CAPS_LATEST("disk-cdrom-empty-network-invalid");
DO_TEST_CAPS_LATEST("disk-cdrom-network");
DO_TEST("disk-cdrom-bus-other", QEMU_CAPS_DEVICE_USB_STORAGE);