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>
This commit is contained in:
Kevin Wolf 2016-09-20 13:38:49 +02:00
parent 7a9877a026
commit 486b88bdc8
2 changed files with 73 additions and 17 deletions

View file

@ -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)