]> xenbits.xensource.com Git - libvirt.git/commitdiff
testQemuAgentFSTrim: Rewrite using qemuMonitorTestAddItemVerbatim
authorPeter Krempa <pkrempa@redhat.com>
Mon, 22 May 2023 15:08:27 +0000 (17:08 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Jun 2023 11:20:12 +0000 (13:20 +0200)
Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuagenttest.c

index 04faf7b83a9ebfe74eb744521f3e954f255aecf5..3c24a3139f42c8bf7c715c1df48ef5a19c6d38ae 100644 (file)
@@ -197,10 +197,11 @@ testQemuAgentFSTrim(const void *data)
     if (qemuMonitorTestAddAgentSyncResponse(test) < 0)
         return -1;
 
-    if (qemuMonitorTestAddItemParams(test, "guest-fstrim",
-                                     "{ \"return\" : {} }",
-                                     "minimum", "1337",
-                                     NULL) < 0)
+    if (qemuMonitorTestAddItemVerbatim(test,
+                                       "{\"execute\":\"guest-fstrim\","
+                                       " \"arguments\": {\"minimum\":1337}}",
+                                       NULL,
+                                       "{ \"return\" : {}}") < 0)
         return -1;
 
     if (qemuAgentFSTrim(qemuMonitorTestGetAgent(test), 1337) < 0)