[PATCH 14/24] virTestLoadFileJSON: Don't try to unwrap JSON documents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use virFileReadAll to load the file instead of virTestLoadFile which
tries to unwrap the file.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/testutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testutils.c b/tests/testutils.c
index 0f6b3a9705..3363d7f0aa 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -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)))
-- 
2.30.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux