
Cédric Bosdonnat wrote:
Follow up of commit 340bb6b7 to add unit tests for the QED format support. Also add missing QED case in xenFormatXLDisk() --- v2: * Separated the QED test files into another set ti make this test conditionnal * Removed useless #ifdef src/xenconfig/xen_xl.c | 3 +++ tests/xlconfigdata/test-disk-qed.cfg | 25 ++++++++++++++++++++ tests/xlconfigdata/test-disk-qed.xml | 45 ++++++++++++++++++++++++++++++++++++ tests/xlconfigtest.c | 3 +++ 4 files changed, 76 insertions(+) create mode 100644 tests/xlconfigdata/test-disk-qed.cfg create mode 100644 tests/xlconfigdata/test-disk-qed.xml
diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 048ecd579..18d9fe369 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -1050,6 +1050,9 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDefPtr disk) case VIR_STORAGE_FILE_QCOW2: virBufferAddLit(&buf, "qcow2"); break; + case VIR_STORAGE_FILE_QED: + virBufferAddLit(&buf, "qed"); + break; /* set default */ default: virBufferAddLit(&buf, "raw"); diff --git a/tests/xlconfigdata/test-disk-qed.cfg b/tests/xlconfigdata/test-disk-qed.cfg new file mode 100644 index 000000000..2a2c4fa84 --- /dev/null +++ b/tests/xlconfigdata/test-disk-qed.cfg @@ -0,0 +1,25 @@ +name = "XenGuest2" +uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem = 579 +memory = 394 +vcpus = 1 +pae = 1 +acpi = 1 +apic = 1 +viridian = 0 +rtc_timeoffset = 0 +localtime = 0 +on_poweroff = "destroy" +on_reboot = "restart" +on_crash = "restart" +device_model = "/usr/lib/xen/bin/qemu-system-i386" +sdl = 0 +vnc = 1 +vncunused = 1 +vnclisten = "127.0.0.1" +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] +parallel = "none" +serial = "none" +builder = "hvm" +boot = "d" +disk = [ "/var/lib/libvirt/images/XenGuest2,qed,hda,rw", ]
With the exception of the explicit 'disk-positional-parms' tests, all of the tests use the more formal key=value syntax. E.g. disk = [ "format=qed,vdev=hda,access=rw,backendtype=qdisk,target=/var/lib/libvirt/images/XenGuest2", ] ACK with that change. Regards, Jim