[libvirt] [PATCH 01/12] tests: assume JSON monitor in qemuMonitorTestNewSimple

Ján Tomko jtomko at redhat.com
Sat Jun 15 11:53:59 UTC 2019


The only user of the qemuMonitorTestNewSimple macro is using JSON.
Always pass 'true' to qemuMonitorTestNew and remove the 'json'
argument.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 tests/qemumonitortestutils.c | 2 +-
 tests/qemumonitortestutils.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index 8d7c503c6e..03261d649e 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -1318,7 +1318,7 @@ qemuMonitorTestNewFromFile(const char *fileName,
     if (virTestLoadFile(fileName, &json) < 0)
         goto cleanup;
 
-    if (simple && !(test = qemuMonitorTestNewSimple(true, xmlopt)))
+    if (simple && !(test = qemuMonitorTestNewSimple(xmlopt)))
         goto cleanup;
 
     /* Our JSON parser expects replies to be separated by a newline character.
diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h
index a2d2d30820..23192c1223 100644
--- a/tests/qemumonitortestutils.h
+++ b/tests/qemumonitortestutils.h
@@ -74,8 +74,8 @@ int qemuMonitorTestAddItemExpect(qemuMonitorTestPtr test,
                                  bool apostrophe,
                                  const char *response);
 
-# define qemuMonitorTestNewSimple(json, xmlopt) \
-    qemuMonitorTestNew(json, xmlopt, NULL, NULL, NULL, NULL)
+# define qemuMonitorTestNewSimple(xmlopt) \
+    qemuMonitorTestNew(true, xmlopt, NULL, NULL, NULL, NULL)
 # define qemuMonitorTestNewSchema(xmlopt, schema) \
     qemuMonitorTestNew(true, xmlopt, NULL, NULL, NULL, schema)
 
-- 
2.20.1




More information about the libvir-list mailing list