Follow up of commit 340bb6b7 to add unit tests for the QED format support. Also add missing QED case in xenFormatXLDisk() --- src/xenconfig/xen_xl.c | 5 +++++ tests/xlconfigdata/test-disk-positional-parms-full.cfg | 2 +- tests/xlconfigdata/test-disk-positional-parms-full.xml | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 048ecd579..65d8ffc63 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -1050,6 +1050,11 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDefPtr disk) case VIR_STORAGE_FILE_QCOW2: virBufferAddLit(&buf, "qcow2"); break; +#ifdef LIBXL_HAVE_QED + case VIR_STORAGE_FILE_QED: + virBufferAddLit(&buf, "qed"); + break; +#endif /* set default */ default: virBufferAddLit(&buf, "raw"); diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.cfg b/tests/xlconfigdata/test-disk-positional-parms-full.cfg index 217d4dccf..20421ffc1 100644 --- a/tests/xlconfigdata/test-disk-positional-parms-full.cfg +++ b/tests/xlconfigdata/test-disk-positional-parms-full.cfg @@ -22,4 +22,4 @@ parallel = "none" serial = "none" builder = "hvm" boot = "d" -disk = [ "/dev/HostVG/XenGuest2,raw,hda,rw,backendtype=phy", "/var/lib/libvirt/images/XenGuest2-home,qcow2,hdb,rw", "/root/boot.iso,raw,hdc,ro,devtype=cdrom" ] +disk = [ "/dev/HostVG/XenGuest2,raw,hda,rw,backendtype=phy", "/var/lib/libvirt/images/XenGuest2-home,qcow2,hdb,rw", "/root/boot.iso,raw,hdc,ro,devtype=cdrom", "/var/lib/libvirt/images/XenGuest2-qed,qed,hdd,rw", ] diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.xml b/tests/xlconfigdata/test-disk-positional-parms-full.xml index 1bc5b436e..9c2fb41b7 100644 --- a/tests/xlconfigdata/test-disk-positional-parms-full.xml +++ b/tests/xlconfigdata/test-disk-positional-parms-full.xml @@ -39,6 +39,12 @@ <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='qed'/> + <source file='/var/lib/libvirt/images/XenGuest2-qed'/> + <target dev='hdd' bus='ide'/> + <address type='drive' controller='0' bus='1' target='0' unit='1'/> + </disk> <controller type='ide' index='0'/> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> -- 2.11.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list