Cover the case of missing disk target to cover the case fixed by previous commit. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- .../disk-missing-target-invalid.err | 1 + .../disk-missing-target-invalid.xml | 22 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 24 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-missing-target-invalid.err create mode 100644 tests/qemuxml2argvdata/disk-missing-target-invalid.xml diff --git a/tests/qemuxml2argvdata/disk-missing-target-invalid.err b/tests/qemuxml2argvdata/disk-missing-target-invalid.err new file mode 100644 index 0000000000..6a33f1e8e8 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-missing-target-invalid.err @@ -0,0 +1 @@ +missing target information for device /dev/HostVG/QEMUGuest1 diff --git a/tests/qemuxml2argvdata/disk-missing-target-invalid.xml b/tests/qemuxml2argvdata/disk-missing-target-invalid.xml new file mode 100644 index 0000000000..49cd73142a --- /dev/null +++ b/tests/qemuxml2argvdata/disk-missing-target-invalid.xml @@ -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> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3b331d5fd4..c67214d01e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -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", -- 2.31.1