[virt-tools-list] [PATCH 2/2] addhardware: use bus, device to distingush usb products

Cole Robinson crobinso at redhat.com
Tue Apr 23 14:35:48 UTC 2013


On 04/23/2013 09:34 AM, Guannan Ren wrote:
> On 04/23/2013 06:40 AM, Cole Robinson wrote:
>> On 04/22/2013 01:45 PM, Guannan Ren wrote:
>>>       def get_net_by_name(self, name):
>>>           for net in self.nets.values():
>>>               if net.get_name() == name:
>>> diff --git a/virtinst/VirtualHostDevice.py b/virtinst/VirtualHostDevice.py
>>> index f5740d0..ee38242 100644
>>> --- a/virtinst/VirtualHostDevice.py
>>> +++ b/virtinst/VirtualHostDevice.py
>>> @@ -215,9 +215,8 @@ class VirtualHostDeviceUSB(VirtualHostDevice):
>>>           self.vendor = nodedev.vendor_id
>>>           self.product = nodedev.product_id
>>>   -        if not (self.vendor or self.product):
>>> -            self.bus = nodedev.bus
>>> -            self.device = nodedev.device
>>> +        self.bus = nodedev.bus
>>> +        self.device = nodedev.device
>>>         def _get_source_xml(self):
>>>           xml = ""
>>>
>> I know this was involved in breaking the test suite in the past, though I
>> think it required another virtinst change. This definitely doesn't cause
>> python setup.py test regressions right?
>>
>> Thanks,
>> Cole
> 
>     Sorry about this, the regression has been fixed in v2.
>     But there are some testing failures on my machine which are not related to
> my patches,
>     I will try to figure them out soon later.
> 

The test suite does regress occasionally with latest libvirt, and when we fix
those it often breaks things on older libvirt. The important thing to check is
that the output doesn't change after patches.

(/me really needs to add some infrastructure that lets us annotate tests with
required libvirt versions...)

- Cole




More information about the virt-tools-list mailing list