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

qemuxml2argvtest: Add test case for missing disk '<target>'

Cover the case of missing disk target to cover the case fixed by
previous commit.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2021-09-07 09:28:51 +02:00
parent 0404d4fc38
commit 5a3c35dc83
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1 @@
missing target information for device /dev/HostVG/QEMUGuest1

View File

@ -0,0 +1,22 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-i386</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
</disk>
<memballoon model='virtio'/>
</devices>
</domain>

View File

@ -1455,6 +1455,7 @@ mymain(void)
DO_TEST_PARSE_ERROR("disk-same-targets",
QEMU_CAPS_SCSI_LSI,
QEMU_CAPS_DEVICE_USB_STORAGE);
DO_TEST_PARSE_ERROR("disk-missing-target-invalid", QEMU_CAPS_SCSI_LSI);
DO_TEST_PARSE_ERROR("disk-address-conflict",
QEMU_CAPS_ICH9_AHCI);
DO_TEST_PARSE_ERROR("disk-hostdev-scsi-address-conflict",