summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/iotests.py
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-09-20 13:38:49 +0200
committerKevin Wolf <kwolf@redhat.com>2016-09-23 13:45:35 +0200
commit486b88bdc87eb70d26428624a1669824e093c861 (patch)
treebd273be4473f30530ba20f53f5b416550dbab092 /tests/qemu-iotests/iotests.py
parent7a9877a0263561f11bae116a7639eec53a625807 (diff)
downloadqemu-486b88bdc87eb70d26428624a1669824e093c861.zip
qemu-iotests/118: Test media change with qdev name
We just added the option to use qdev device names in all device related block QMP commands. This patch converts some of the test cases in 118 to use qdev device names instead of BlockBackend names to cover the new way. It converts cases for each of the media change commands, but only for CD-ROM and not everywhere, so that the old way is still tested, too. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r--tests/qemu-iotests/iotests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index f1f36d7fc7..3329bc1721 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -139,6 +139,11 @@ class VM(qtest.QEMUQtestMachine):
self._debug = True
self._num_drives = 0
+ def add_device(self, opts):
+ self._args.append('-device')
+ self._args.append(opts)
+ return self
+
def add_drive_raw(self, opts):
self._args.append('-drive')
self._args.append(opts)