[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 46/65] qemu-iotests: Allow caller to disable undersco
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 46/65] qemu-iotests: Allow caller to disable underscore convertion for qmp |
Date: |
Fri, 13 Feb 2015 16:24:42 +0000 |
From: Fam Zheng <address@hidden>
QMP command "block_set_io_throttle" expects underscores in parameters
instead of dashes: {iops,bps}_{rd,wr,max}.
Add optional argument conv_keys (defaults to True, backward compatible),
it will be used in IO throttling test case.
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
tests/qemu-iotests/iotests.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 85cb9a5..1402854 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -185,11 +185,14 @@ class VM(object):
self._popen = None
underscore_to_dash = string.maketrans('_', '-')
- def qmp(self, cmd, **args):
+ def qmp(self, cmd, conv_keys=True, **args):
'''Invoke a QMP command and return the result dict'''
qmp_args = dict()
for k in args.keys():
- qmp_args[k.translate(self.underscore_to_dash)] = args[k]
+ if conv_keys:
+ qmp_args[k.translate(self.underscore_to_dash)] = args[k]
+ else:
+ qmp_args[k] = args[k]
return self._qmp.cmd(cmd, args=qmp_args)
--
2.1.0
- [Qemu-devel] [PULL 37/65] qtest/ahci: Assert sector size in identify test, (continued)
- [Qemu-devel] [PULL 37/65] qtest/ahci: Assert sector size in identify test, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 40/65] savevm: Improve error message for blocked migration, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 38/65] qtest/ahci: Adding simple dma read-write test, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 35/65] libqos/ahci: add ahci_io, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 41/65] block: vmdk - fixed sizeof() error, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 39/65] nbd: fix the co_queue multi-adding bug, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 43/65] qemu-io: Account IO by aio_read and aio_write, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 44/65] qtest: Add scripts/qtest.py, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 45/65] qemu-iotests: Add VM method qtest() to iotests.py, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 42/65] qtest: Fix deadloop by running main loop AIO context's timers, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 46/65] qemu-iotests: Allow caller to disable underscore convertion for qmp,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 48/65] qemu-img: Fix qemu-img convert -n, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 50/65] block: Lift some BDS functions to the BlockBackend, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 49/65] iotests: Add test for qemu-img convert to NBD, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 51/65] block: Add blk_new_open(), Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 47/65] qemu-iotests: Add 093 for IO throttling, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 52/65] block: Add Error parameter to bdrv_find_protocol(), Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 56/65] qemu-img: Use blk_new_open() in img_open(), Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 57/65] qemu-img: Use blk_new_open() in img_rebase(), Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 53/65] iotests: Add test for driver=qcow2, format=qcow2, Stefan Hajnoczi, 2015/02/13
- [Qemu-devel] [PULL 60/65] qemu-io: Use blk_new_open() in openfile(), Stefan Hajnoczi, 2015/02/13