提交 3a75fca2 编写于 作者: J Ján Tomko

Move volume XMLs out of storagevolxml2argvdata

Reuse the XML files in storagevolxml2xmlin.

(This requires changing a few backing files to /dev/null,
since virStorageBackendCreateQemuImgCmd checks for its
presence)
上级 82377882
<volume>
<name>sparse.img</name>
<source/>
<capacity unit="TiB">1</capacity>
<allocation unit="bytes">0</allocation>
<target>
<path>/var/lib/libvirt/images/sparse.img</path>
<permissions>
<mode>0</mode>
<owner>0744</owner>
<group>0</group>
<label>virt_image_t</label>
</permissions>
<timestamps>
<atime>1341933637.273190990</atime>
<mtime>1341930622.047245868</mtime>
<ctime>1341930622.047245868</ctime>
</timestamps>
</target>
</volume>
<volume>
<name>OtherDemo.img</name>
<key>/var/lib/libvirt/images/OtherDemo.img</key>
<source>
</source>
<capacity unit="G">5</capacity>
<allocation>294912</allocation>
<target>
<path>/var/lib/libvirt/images/OtherDemo.img</path>
<format type='qcow2'/>
<permissions>
<mode>0644</mode>
<owner>0</owner>
<group>0</group>
<label>unconfined_u:object_r:virt_image_t:s0</label>
</permissions>
<encryption format='qcow'>
<secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
</encryption>
<features/>
</target>
<backingStore>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
<owner>0</owner>
<group>0</group>
<label>unconfined_u:object_r:virt_image_t:s0</label>
</permissions>
</backingStore>
</volume>
......@@ -121,12 +121,12 @@ testCompareXMLToArgvHelper(const void *data)
char *cmdline = NULL;
if (info->inputvol &&
virAsprintf(&inputvolxml, "%s/storagevolxml2argvdata/%s.xml",
virAsprintf(&inputvolxml, "%s/storagevolxml2xmlin/%s.xml",
abs_srcdir, info->inputvol) < 0)
goto cleanup;
if (virAsprintf(&poolxml, "%s/storagepoolxml2xmlin/%s.xml",
abs_srcdir, info->pool) < 0 ||
virAsprintf(&volxml, "%s/storagevolxml2argvdata/%s.xml",
virAsprintf(&volxml, "%s/storagevolxml2xmlin/%s.xml",
abs_srcdir, info->vol) < 0) {
goto cleanup;
}
......
......@@ -20,7 +20,7 @@
<features/>
</target>
<backingStore>
<path>/var/lib/libvirt/images/BaseDemo.img</path>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
......
......@@ -23,7 +23,7 @@
</features>
</target>
<backingStore>
<path>/var/lib/libvirt/images/BaseDemo.img</path>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
......
......@@ -19,7 +19,7 @@
</encryption>
</target>
<backingStore>
<path>/var/lib/libvirt/images/BaseDemo.img</path>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
......
<volume>
<name>OtherDemo.img</name>
<key>/var/lib/libvirt/images/OtherDemo.img</key>
<key>(null)</key>
<source>
</source>
<capacity unit="G">5</capacity>
<allocation>294912</allocation>
<capacity unit='bytes'>5368709120</capacity>
<allocation unit='bytes'>294912</allocation>
<target>
<path>/var/lib/libvirt/images/OtherDemo.img</path>
<format type='qcow2'/>
......@@ -17,7 +17,7 @@
<encryption format='qcow'>
<secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
</encryption>
<compat>1.1</compat>
<compat>0.10</compat>
<features>
<lazy_refcounts/>
</features>
......
......@@ -21,7 +21,7 @@
<features/>
</target>
<backingStore>
<path>/var/lib/libvirt/images/BaseDemo.img</path>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
......
......@@ -23,7 +23,7 @@
</features>
</target>
<backingStore>
<path>/var/lib/libvirt/images/BaseDemo.img</path>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
......
<volume>
<name>OtherDemo.img</name>
<key>/var/lib/libvirt/images/OtherDemo.img</key>
<key>(null)</key>
<source>
</source>
<capacity unit="G">5</capacity>
<allocation>294912</allocation>
<capacity unit='bytes'>5368709120</capacity>
<allocation unit='bytes'>294912</allocation>
<target>
<path>/var/lib/libvirt/images/OtherDemo.img</path>
<format type='qcow2'/>
......@@ -18,14 +18,4 @@
<secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
</encryption>
</target>
<backingStore>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
<owner>0</owner>
<group>0</group>
<label>unconfined_u:object_r:virt_image_t:s0</label>
</permissions>
</backingStore>
</volume>
......@@ -19,7 +19,7 @@
</encryption>
</target>
<backingStore>
<path>/var/lib/libvirt/images/BaseDemo.img</path>
<path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
......
......@@ -114,6 +114,8 @@ mymain(void)
DO_TEST("pool-dir", "vol-qcow2");
DO_TEST("pool-dir", "vol-qcow2-1.1");
DO_TEST("pool-dir", "vol-qcow2-lazy");
DO_TEST("pool-dir", "vol-qcow2-0.10-lazy");
DO_TEST("pool-dir", "vol-qcow2-nobacking");
DO_TEST("pool-disk", "vol-partition");
DO_TEST("pool-logical", "vol-logical");
DO_TEST("pool-logical", "vol-logical-backing");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册