From 5a3c35dc83f2918afa9fb5d36267e1bad80ada85 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 7 Sep 2021 09:28:51 +0200 Subject: [PATCH] qemuxml2argvtest: Add test case for missing disk '' Cover the case of missing disk target to cover the case fixed by previous commit. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- .../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 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i386 + + + + + + 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",