]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemumonitorjsontest: Use 'id' instead of deprecated 'device' argument of 'block_set_i...
authorPeter Krempa <pkrempa@redhat.com>
Tue, 23 May 2023 12:20:29 +0000 (14:20 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Jun 2023 11:20:13 +0000 (13:20 +0200)
The 'device' argument is deprecated. All real usage in the qemu driver
already uses 'id' as we populate the 'qomName' for everything except for
SD cards where throttling didn't work with libvirt for a very long time.

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

index c3963050de8031f9ed40a2981e66b2a72049a75b..5c056692800acfce1a3125cb82e87945d3924ed0 100644 (file)
@@ -1870,7 +1870,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *opaque)
 
     if (qemuMonitorTestAddItemVerbatim(test,
                                        "{\"execute\":\"block_set_io_throttle\","
-                                       " \"arguments\":{\"device\": \"drive-virtio-disk1\","
+                                       " \"arguments\":{\"id\": \"drive-virtio-disk1\","
                                        "                \"bps\": 1,"
                                        "                \"bps_rd\": 2,"
                                        "                \"bps_wr\": 3,"
@@ -1904,7 +1904,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *opaque)
         goto cleanup;
 
     if (qemuMonitorJSONSetBlockIoThrottle(qemuMonitorTestGetMonitor(test),
-                                          "drive-virtio-disk1", NULL, &info) < 0)
+                                          NULL, "drive-virtio-disk1", &info) < 0)
         goto cleanup;
 
     ret = 0;