[Libvirt-cim] [PATCH] [TEST] Fix VSMS 09_procrasd_persist and 11_define_memrasdunits

Chip Vincent cvincent at linux.vnet.ibm.com
Thu Nov 17 20:31:41 UTC 2011


Missed this one. Thanks. Pushed.

On 11/03/2011 12:41 PM, Sharad Mishra wrote:
> +1
>
> Sharad Mishra
> Open Virtualization
> Linux Technology Center
> IBM
>
> libvirt-cim-bounces at redhat.com wrote on 10/27/2011 02:07:30 PM:
>
>> "Eduardo Lima (Etrunko)"<eblima at linux.vnet.ibm.com>
>> Sent by: libvirt-cim-bounces at redhat.com
>>
>> 10/27/2011 02:07 PM
>>
>> Please respond to
>> List for discussion and development of libvirt CIM
> <libvirt-cim at redhat.com>
>> To
>>
>> libvirt-cim at redhat.com
>>
>> cc
>>
>> "Eduardo Lima \(Etrunko\)"<eblima at br.ibm.com>
>>
>> Subject
>>
>> [Libvirt-cim] [PATCH] [TEST] Fix VSMS 09_procrasd_persist and
>> 11_define_memrasdunits
>>
>> From: Eduardo Lima (Etrunko)<eblima at br.ibm.com>
>>
>> Both tests were failing due to reusing an instance of the class for
> defining
>> domains in a loop. The error message was the following:
>>
>>      ERROR - Got CIM error CIM_ERR_FAILED: ResourceSettings Error:
>> VirtualDevice
>>      property must be unique for each DiskResourceAllocationSettingData in
> a
>>      single guest with return code 1
>>
>> A recent change in XenKvmLib/vxml.py necessary for the new test
>> 32_modify_cdrom_media.py triggered this bug. To avoid this error we
> simply
>> create a new instance of that class in each iteration of the loop.
>>
>> Signed-off-by: Eduardo Lima (Etrunko)<eblima at br.ibm.com>
>> ---
>>   .../09_procrasd_persist.py                         |    3 ++-
>>   .../11_define_memrasdunits.py                      |    4 ++--
>>   2 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/suites/libvirt-cim/cimtest/
>> VirtualSystemManagementService/09_procrasd_persist.py b/suites/
>> libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py
>> index 91415dd..a53c5ac 100644
>> --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/
>> 09_procrasd_persist.py
>> +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/
>> 09_procrasd_persist.py
>> @@ -119,11 +119,12 @@ def main():
>>       virt = options.virt
>>       server = options.ip
>>
>> -    cxml = get_class(virt)(test_dom)
>> +    cxml = None
>>       prasd_cn = get_typed_class(virt,
> "ProcResourceAllocationSettingData")
>>       dom_define = dom_start = False
>>       try:
>>           for count in range(3):
>> +            cxml = get_class(virt)(test_dom)
>>               status = setup_guest(server, virt, cxml, prasd_cn)
>>               if status != PASS:
>>                   return status
>> diff --git a/suites/libvirt-cim/cimtest/
>> VirtualSystemManagementService/11_define_memrasdunits.py b/suites/
>>
> libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py
>
>> index 8c032c2..3f54ff4 100644
>> --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/
>> 11_define_memrasdunits.py
>> +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/
>> 11_define_memrasdunits.py
>> @@ -113,8 +113,7 @@ def check_value(options):
>>   def main():
>>       options = main.options
>>
>> -    cxml = get_class(options.virt)(default_dom)
>> -
>> +    cxml = None
>>       status = FAIL
>>       guest_is_undefined = None
>>
>> @@ -123,6 +122,7 @@ def main():
>>
>>           value = mem_bytes>>  shift
>>
>> +        cxml = get_class(options.virt)(default_dom)
>>           status = try_define(options, units, value, cxml)
>>           if status != PASS:
>>               break
>> --
>> 1.7.4.4
>>
>> _______________________________________________
>> Libvirt-cim mailing list
>> Libvirt-cim at redhat.com
>> https://www.redhat.com/mailman/listinfo/libvirt-cim
>>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>


-- 
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list