mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +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) jsonsrc = NULL;
|
||||
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)
|
||||
backendpropsflags |= QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY;
|
||||
@ -157,7 +157,7 @@ testJSONtoJSON(const void *args)
|
||||
}
|
||||
|
||||
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");
|
||||
return -1;
|
||||
}
|
||||
|
@ -2,8 +2,7 @@
|
||||
"driver": "https",
|
||||
"url": "https://test.host:443/whatever.img",
|
||||
"sslverify": false,
|
||||
"cookie": "some_cookie=\"some_value_or_whatever\"",
|
||||
"timeout": 2000,
|
||||
"readahead": 65536,
|
||||
"auto-read-only": true,
|
||||
"discard": "unmap"
|
||||
"readahead": 65536
|
||||
}
|
||||
|
@ -8,7 +8,5 @@
|
||||
"user": "testuser",
|
||||
"host-key-check": {
|
||||
"mode": "none"
|
||||
},
|
||||
"auto-read-only": true,
|
||||
"discard": "unmap"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user