mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-03 04:45:46 +00:00
qemublocktest: Use "target only" mode in 'testJSONtoJSON' and 'testBackingXMLjsonXML'
Both tests pass a disk source definition which didn't go through the preparation steps and thus contains only the target information that were originally present, thus we should be using the QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY flag. For the same reason QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY used in 'testJSONtoJSON' doesn't make sense. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e60c3057cc
commit
b9a5541b49
@ -59,7 +59,7 @@ testBackingXMLjsonXML(const void *args)
|
|||||||
g_autoptr(virStorageSource) xmlsrc = NULL;
|
g_autoptr(virStorageSource) xmlsrc = NULL;
|
||||||
g_autoptr(virStorageSource) jsonsrc = NULL;
|
g_autoptr(virStorageSource) jsonsrc = NULL;
|
||||||
g_auto(virBuffer) debug = VIR_BUFFER_INITIALIZER;
|
g_auto(virBuffer) debug = VIR_BUFFER_INITIALIZER;
|
||||||
unsigned int backendpropsflags = 0;
|
unsigned int backendpropsflags = QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY;
|
||||||
|
|
||||||
if (data->legacy)
|
if (data->legacy)
|
||||||
backendpropsflags |= QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY;
|
backendpropsflags |= QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY;
|
||||||
@ -157,7 +157,7 @@ testJSONtoJSON(const void *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(jsonsrcout = qemuBlockStorageSourceGetBackendProps(src,
|
if (!(jsonsrcout = qemuBlockStorageSourceGetBackendProps(src,
|
||||||
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY))) {
|
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY))) {
|
||||||
fprintf(stderr, "failed to format disk source json\n");
|
fprintf(stderr, "failed to format disk source json\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
"driver": "https",
|
"driver": "https",
|
||||||
"url": "https://test.host:443/whatever.img",
|
"url": "https://test.host:443/whatever.img",
|
||||||
"sslverify": false,
|
"sslverify": false,
|
||||||
|
"cookie": "some_cookie=\"some_value_or_whatever\"",
|
||||||
"timeout": 2000,
|
"timeout": 2000,
|
||||||
"readahead": 65536,
|
"readahead": 65536
|
||||||
"auto-read-only": true,
|
|
||||||
"discard": "unmap"
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,5 @@
|
|||||||
"user": "testuser",
|
"user": "testuser",
|
||||||
"host-key-check": {
|
"host-key-check": {
|
||||||
"mode": "none"
|
"mode": "none"
|
||||||
},
|
}
|
||||||
"auto-read-only": true,
|
|
||||||
"discard": "unmap"
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user