[PATCH 15/18] qemumonitorjsontest: Use 'id' instead of deprecated 'device' argument of 'block_set_io_throttle'

Peter Krempa posted 18 patches 1 year, 7 months ago
[PATCH 15/18] qemumonitorjsontest: Use 'id' instead of deprecated 'device' argument of 'block_set_io_throttle'
Posted by Peter Krempa 1 year, 7 months ago
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>
---
 tests/qemumonitorjsontest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index c3963050de..5c05669280 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -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;
-- 
2.40.1
Re: [PATCH 15/18] qemumonitorjsontest: Use 'id' instead of deprecated 'device' argument of 'block_set_io_throttle'
Posted by Ján Tomko 1 year, 6 months ago
On a Thursday in 2023, Peter Krempa wrote:
>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>
>---
> tests/qemumonitorjsontest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano