On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> 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 <kw...@redhat.com>
> ---
>  tests/qemu-iotests/118        | 85 
> ++++++++++++++++++++++++++++++++++---------
>  tests/qemu-iotests/iotests.py |  5 +++
>  2 files changed, 73 insertions(+), 17 deletions(-)
> 

> @@ -90,7 +99,10 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
>          self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>  
>      def test_eject(self):
> -        result = self.vm.qmp('eject', device='drive0', force=True)
> +        if self.device_name is not None:

I guess writing it like this instead of "if not self.device_name:"
allows us to write a test where self.device_name is "", if we wanted to
make sure that error message is sane.  Probably not worth changing
anything based on that observation, so keep the patch as-is, and add:

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to