[Libvirt-cim] [PATCH] [TEST] Fixing 01_forward.py tc of SystemDevice

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Tue Nov 4 09:57:09 UTC 2008



Kaitlin Rupert wrote:
> Deepti B. Kalakeri wrote:
>> # HG changeset patch
>> # User Deepti B. Kalakeri<deeptik at linux.vnet.ibm.com>
>> # Date 1225568161 25200
>> # Node ID e92fbb2fe87e11509a5d506f4529368f97ee59cd
>> # Parent d1614c101c281b57bd2bc98dfb6625f790748e54
>> [TEST] Fixing 01_forward.py tc of SystemDevice.
>>
>> Signed-off-by: Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
>>
>> diff -r d1614c101c28 -r e92fbb2fe87e 
>> suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
>
>
> This loop doesn't verify we got back the instances expected. If we get 
> only 3 instances back, but we expected 4, then we should return an error.
>
> Although, we need to check more than the numbers of instances 
> returned. If we get 1 proc inst, 2 net instances when we expected 1 
> proc, 1 net, and 1 mem inst - we should return an error.
>
Thats very good points , patch with changes submitted.
>> + for dev in devs:
>> + dev_cn = dev['CreationClassname']
>> + devid = dev['DeviceID']
>> + _devid = cn_devid[dev_cn]
>> + if devid != _devid:
>> + logger.error("DeviceID `%s` != `%s'" % (devid, _devid))
>> + status = FAIL
>
> If the test encounters an error, the test should break from the loop.
>
>> + else:
>> + logger.info("Examined %s" % _devid)
>
> I don't think logging we ids we examined is important. Instead, there 
> should be some kind of check as mentioned above.
>
>> cxml.destroy(options.ip)
>> cxml.undefine(options.ip)
>
>




More information about the Libvirt-cim mailing list