This provides coverage for the (very unlikely) scenario in which none of the possible devices are built into QEMU. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- ...ler-scsi-default-unavailable.x86_64-latest.err | 1 + .../controller-scsi-default-unavailable.xml | 15 +++++++++++++++ tests/qemuxmlconftest.c | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/qemuxmlconfdata/controller-scsi-default-unavailable.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/controller-scsi-default-unavailable.xml diff --git a/tests/qemuxmlconfdata/controller-scsi-default-unavailable.x86_64-latest.err b/tests/qemuxmlconfdata/controller-scsi-default-unavailable.x86_64-latest.err new file mode 100644 index 0000000000..3648abd871 --- /dev/null +++ b/tests/qemuxmlconfdata/controller-scsi-default-unavailable.x86_64-latest.err @@ -0,0 +1 @@ +internal error: Unable to determine model for SCSI controller idx=0 diff --git a/tests/qemuxmlconfdata/controller-scsi-default-unavailable.xml b/tests/qemuxmlconfdata/controller-scsi-default-unavailable.xml new file mode 100644 index 0000000000..e438dcf5bc --- /dev/null +++ b/tests/qemuxmlconfdata/controller-scsi-default-unavailable.xml @@ -0,0 +1,15 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <vcpu placement='static'>8</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + </os> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='scsi'/> + <controller type='usb' model='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index e1ee1fbce3..c43f4cab67 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -1587,6 +1587,12 @@ mymain(void) DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-scsi-disk-vpd-build-error"); DO_TEST_CAPS_LATEST("controller-virtio-scsi"); DO_TEST_CAPS_LATEST("controller-scsi-auto"); + DO_TEST_FULL("controller-scsi-default-unavailable", ".x86_64-latest", + ARG_CAPS_ARCH, "x86_64", + ARG_CAPS_VER, "latest", + ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR, + ARG_QEMU_CAPS_DEL, QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_LAST, + ARG_END); DO_TEST_CAPS_LATEST("disk-sata-device"); DO_TEST_CAPS_LATEST("disk-aio"); DO_TEST_CAPS_LATEST("disk-aio-io_uring"); -- 2.43.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx