mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virstoragetest: Add case for qcow2 image with empty string as 'data_file'
Add an example image formatted by: qemu-img create -f qcow2 -o data_file=nbd+unix:///datafile?socket=/tmp/nbd,data_file_raw=true /tmp/nbddatastore.qcow2 10M -u serving as an example when qemu records an empty string as the 'data_file' field. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
87a4fe2906
commit
e6a4245d2a
@ -494,6 +494,11 @@ mymain(void)
|
|||||||
abs_srcdir "/virstoragetestdata/images/qcow2datafile-datafile.qcow2",
|
abs_srcdir "/virstoragetestdata/images/qcow2datafile-datafile.qcow2",
|
||||||
VIR_STORAGE_FILE_QCOW2, EXP_PASS);
|
VIR_STORAGE_FILE_QCOW2, EXP_PASS);
|
||||||
|
|
||||||
|
/* broken qcow2 with a 'data_file' which is an empty string */
|
||||||
|
TEST_CHAIN("qcow2-datafile-broken",
|
||||||
|
abs_srcdir "/virstoragetestdata/images/datafile-emptystr.qcow2",
|
||||||
|
VIR_STORAGE_FILE_QCOW2, EXP_FAIL);
|
||||||
|
|
||||||
/* Test various combinations of qcow2 images with missing 'backing_format' */
|
/* Test various combinations of qcow2 images with missing 'backing_format' */
|
||||||
TEST_CHAIN("qcow2-qcow2_qcow2-qcow2_qcow2-auto",
|
TEST_CHAIN("qcow2-qcow2_qcow2-qcow2_qcow2-auto",
|
||||||
abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2",
|
abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2",
|
||||||
|
BIN
tests/virstoragetestdata/images/datafile-emptystr.qcow2
Normal file
BIN
tests/virstoragetestdata/images/datafile-emptystr.qcow2
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user