QEMU doesn't like the backing store string generated by libvirt with -blockdev. Luckily we are able to parse them back and with blockdev they would no longer be used by qemu directly. Fix the generator an da few issues noticed along. Peter Krempa (14): conf: rename 'namespace' property of struct _virStorageSourceNVMeDef qemublocktest: xml->json: Add test for NVMe virDomainDiskSourceNVMeFormat: Format only valid 'managed' values qemublocktest: xml->json: Refactor cleanup in test case functions testQemuDiskXMLToPropsValidateFileSrcOnly: Move together with rest of xml->json code qemuBlockGetBackingStoreString: Add 'pretty' argument testQemuDiskXMLToProps: Store all per-image data in one structure qemublocktest: Test backing store strings qemuBlockGetBackingStoreString: Remove 'ret' variable storage: Implement backing store support for "fat:" prefix qemuBlockGetBackingStoreString: Add extra wrapping object to JSON strings qemu: block: Extract formatting of cookie string qemuBlockGetBackingStoreString: Properly handle 'http/s' with cookies and others storage: Parse 'nvme' disk source properties from json:{} pseudo-uri src/conf/domain_conf.c | 17 +- src/hypervisor/virhostdev.c | 2 +- src/qemu/qemu_block.c | 64 +++-- src/qemu/qemu_block.h | 6 +- src/qemu/qemu_domain.c | 13 +- src/qemu/qemu_driver.c | 4 +- src/util/virstoragefile.c | 43 +++- src/util/virstoragefile.h | 2 +- tests/qemublocktest.c | 232 ++++++++++-------- .../qcow2-backing-qcow2-slice.json | 2 +- .../imagecreate/qcow2-backing-raw-slice.json | 2 +- .../xml2json/block-raw-noopts-srconly.json | 13 +- .../block-raw-reservations-srconly.json | 13 +- .../xml2json/dir-fat-cache-srconly.json | 15 +- .../xml2json/dir-fat-floppy-srconly.json | 15 +- .../xml2json/dir-fat-readonly-srconly.json | 15 +- ...ile-backing_basic-aio_threads-srconly.json | 68 +++-- ...acking_basic-cache-directsync-srconly.json | 68 +++-- ...file-backing_basic-cache-none-srconly.json | 68 +++-- ...le-backing_basic-cache-unsafe-srconly.json | 68 +++-- ...backing_basic-cache-writeback-srconly.json | 68 +++-- ...king_basic-cache-writethrough-srconly.json | 68 +++-- .../file-backing_basic-detect-srconly.json | 68 +++-- .../file-backing_basic-noopts-srconly.json | 52 ++-- ...le-backing_basic-unmap-detect-srconly.json | 68 +++-- ...le-backing_basic-unmap-ignore-srconly.json | 68 +++-- .../file-backing_basic-unmap-srconly.json | 68 +++-- .../xml2json/file-bochs-noopts-srconly.json | 13 +- .../xml2json/file-cloop-noopts-srconly.json | 13 +- .../xml2json/file-dmg-noopts-srconly.json | 13 +- .../xml2json/file-ploop-noopts-srconly.json | 13 +- ...cow2-backing-chain-encryption-srconly.json | 26 +- ...le-qcow2-backing-chain-noopts-srconly.json | 130 +++++++--- ...w2-backing-chain-unterminated-srconly.json | 26 +- .../xml2json/file-raw-aio_native-srconly.json | 13 +- .../xml2json/file-raw-luks-srconly.json | 13 +- .../xml2json/file-raw-noopts-srconly.json | 13 +- .../xml2json/file-vdi-noopts-srconly.json | 13 +- .../xml2json/file-vhd-noopts-srconly.json | 13 +- .../xml2json/file-vpc-noopts-srconly.json | 13 +- .../network-http-curlopts-srconly.json | 17 ++ .../xml2json/network-http-curlopts.json | 15 ++ .../xml2json/network-http-curlopts.xml | 20 ++ .../xml2json/network-http-noopts-srconly.json | 9 + .../xml2json/network-http-noopts.json | 14 ++ .../xml2json/network-http-noopts.xml | 15 ++ .../xml2json/network-nbd-tls-srconly.json | 19 +- ...w2-backing-chain-cache-unsafe-srconly.json | 69 ++++-- ...backing-chain-encryption_auth-srconly.json | 69 ++++-- .../xml2json/nvme-raw-noopts-srconly.json | 15 ++ .../xml2json/nvme-raw-noopts.json | 14 ++ .../xml2json/nvme-raw-noopts.xml | 13 + tests/virstoragetest.c | 10 + 53 files changed, 1226 insertions(+), 575 deletions(-) create mode 100644 tests/qemublocktestdata/xml2json/network-http-curlopts-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/network-http-curlopts.json create mode 100644 tests/qemublocktestdata/xml2json/network-http-curlopts.xml create mode 100644 tests/qemublocktestdata/xml2json/network-http-noopts-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/network-http-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/network-http-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts.xml -- 2.24.1