diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index c28a23e332..53533d5885 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -478,6 +478,14 @@ mymain(void) abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-auto.qcow2", VIR_STORAGE_FILE_QCOW2, EXP_PASS); + /* QCOW2 with protocol recorded inside the 'backing file format field */ + TEST_CHAIN("qcow2-protocol-backing-file", + abs_srcdir "/virstoragetestdata/images/qcow2-protocol-backing-file.qcow2", + VIR_STORAGE_FILE_QCOW2, EXP_PASS); + TEST_CHAIN("qcow2-protocol-backing-nbd", + abs_srcdir "/virstoragetestdata/images/qcow2-protocol-backing-nbd.qcow2", + VIR_STORAGE_FILE_QCOW2, EXP_FAIL); + /* Qcow2 file with missing backing file but specified type */ TEST_CHAIN("qcow2-qcow2_missing", abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-missing.qcow2", diff --git a/tests/virstoragetestdata/images/qcow2-protocol-backing-file.qcow2 b/tests/virstoragetestdata/images/qcow2-protocol-backing-file.qcow2 new file mode 100644 index 0000000000..b3fe320f0f Binary files /dev/null and b/tests/virstoragetestdata/images/qcow2-protocol-backing-file.qcow2 differ diff --git a/tests/virstoragetestdata/images/qcow2-protocol-backing-nbd.qcow2 b/tests/virstoragetestdata/images/qcow2-protocol-backing-nbd.qcow2 new file mode 100644 index 0000000000..0ae422d8f5 Binary files /dev/null and b/tests/virstoragetestdata/images/qcow2-protocol-backing-nbd.qcow2 differ diff --git a/tests/virstoragetestdata/out/qcow2-protocol-backing-file b/tests/virstoragetestdata/out/qcow2-protocol-backing-file new file mode 100644 index 0000000000..b565bdba77 --- /dev/null +++ b/tests/virstoragetestdata/out/qcow2-protocol-backing-file @@ -0,0 +1,21 @@ +path:ABS_SRCDIR/virstoragetestdata/images/qcow2-protocol-backing-file.qcow2 +backingStoreRaw: raw +backingStoreRawFormat: (-1) +capacity: 1024 +encryption: 0 +relPath: +type:file +format:qcow2 +protocol:none +hostname: + +path:ABS_SRCDIR/virstoragetestdata/images/raw +backingStoreRaw: +backingStoreRawFormat: none(0) +capacity: 0 +encryption: 0 +relPath:raw +type:file +format:raw +protocol:none +hostname: