mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virTestLoadFileJSON: Don't try to unwrap JSON documents
Use virFileReadAll to load the file instead of virTestLoadFile which tries to unwrap the file. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
19659d839c
commit
e5124770db
@ -313,7 +313,7 @@ virTestLoadFileJSON(const char *p, ...)
|
||||
if (!(path = virTestLoadFileGetPath(p, ap)))
|
||||
goto cleanup;
|
||||
|
||||
if (virTestLoadFile(path, &jsonstr) < 0)
|
||||
if (virFileReadAll(path, INT_MAX, &jsonstr) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(ret = virJSONValueFromString(jsonstr)))
|
||||
|
Loading…
Reference in New Issue
Block a user