mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
virstoragetest: Reinstate testing of images without 'backing_fmt'
There are important security implications when we'd misprobe those
images. This commit reinstates the tests removed by commit 979d1ba3ae
since 'qemu-img' refused to format them.
With the new testing approach with stored images we won't run into that
problem.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
12906d1985
commit
4f7aaa1b7b
@ -464,6 +464,20 @@ mymain(void)
|
||||
|
||||
testCleanupImages();
|
||||
|
||||
/* Test various combinations of qcow2 images with missing 'backing_format' */
|
||||
TEST_CHAIN("qcow2-qcow2_qcow2-qcow2_qcow2-auto",
|
||||
abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2",
|
||||
VIR_STORAGE_FILE_QCOW2, EXP_PASS);
|
||||
TEST_CHAIN("qcow2-qcow2_qcow2-qcow2_raw-auto",
|
||||
abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2",
|
||||
VIR_STORAGE_FILE_QCOW2, EXP_PASS);
|
||||
TEST_CHAIN("qcow2-qcow2_qcow2-auto_qcow2-auto",
|
||||
abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-auto_qcow2-auto.qcow2",
|
||||
VIR_STORAGE_FILE_QCOW2, EXP_FAIL);
|
||||
TEST_CHAIN("qcow2-qcow2_qcow2-auto",
|
||||
abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-auto.qcow2",
|
||||
VIR_STORAGE_FILE_QCOW2, EXP_PASS);
|
||||
|
||||
/* Qcow2 file with missing backing file but specified type */
|
||||
TEST_CHAIN("qcow2-qcow2_missing",
|
||||
abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-missing.qcow2",
|
||||
|
BIN
tests/virstoragetestdata/images/qcow2
Normal file
BIN
tests/virstoragetestdata/images/qcow2
Normal file
Binary file not shown.
BIN
tests/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
Normal file
BIN
tests/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
tests/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2
Normal file
BIN
tests/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2
Normal file
Binary file not shown.
BIN
tests/virstoragetestdata/images/qcow2_raw-auto.qcow2
Normal file
BIN
tests/virstoragetestdata/images/qcow2_raw-auto.qcow2
Normal file
Binary file not shown.
19
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
Normal file
19
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
Normal file
@ -0,0 +1,19 @@
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
|
||||
backingStoreRaw: qcow2
|
||||
capacity: 1024
|
||||
encryption: 0
|
||||
relPath:<null>
|
||||
type:1
|
||||
format:14
|
||||
protocol:none
|
||||
hostname:<null>
|
||||
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/qcow2
|
||||
backingStoreRaw: <null>
|
||||
capacity: 1024
|
||||
encryption: 0
|
||||
relPath:qcow2
|
||||
type:1
|
||||
format:14
|
||||
protocol:none
|
||||
hostname:<null>
|
@ -0,0 +1,29 @@
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2
|
||||
backingStoreRaw: qcow2_qcow2-auto.qcow2
|
||||
capacity: 1024
|
||||
encryption: 0
|
||||
relPath:<null>
|
||||
type:1
|
||||
format:14
|
||||
protocol:none
|
||||
hostname:<null>
|
||||
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
|
||||
backingStoreRaw: qcow2
|
||||
capacity: 1024
|
||||
encryption: 0
|
||||
relPath:qcow2_qcow2-auto.qcow2
|
||||
type:1
|
||||
format:14
|
||||
protocol:none
|
||||
hostname:<null>
|
||||
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/qcow2
|
||||
backingStoreRaw: <null>
|
||||
capacity: 1024
|
||||
encryption: 0
|
||||
relPath:qcow2
|
||||
type:1
|
||||
format:14
|
||||
protocol:none
|
||||
hostname:<null>
|
@ -0,0 +1,29 @@
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2
|
||||
backingStoreRaw: qcow2_raw-auto.qcow2
|
||||
capacity: 1024
|
||||
encryption: 0
|
||||
relPath:<null>
|
||||
type:1
|
||||
format:14
|
||||
protocol:none
|
||||
hostname:<null>
|
||||
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-auto.qcow2
|
||||
backingStoreRaw: raw
|
||||
capacity: 1024
|
||||
encryption: 0
|
||||
relPath:qcow2_raw-auto.qcow2
|
||||
type:1
|
||||
format:14
|
||||
protocol:none
|
||||
hostname:<null>
|
||||
|
||||
path:ABS_SRCDIR/virstoragetestdata/images/raw
|
||||
backingStoreRaw: <null>
|
||||
capacity: 0
|
||||
encryption: 0
|
||||
relPath:raw
|
||||
type:1
|
||||
format:1
|
||||
protocol:none
|
||||
hostname:<null>
|
Loading…
Reference in New Issue
Block a user