[Libvirt-cim] [PATCH] [TEST] Fix potiential false positive in CS 02

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Sat Jul 19 21:25:43 UTC 2008


Dan Smith wrote:
> DK> Why don't we just remove Dom-0 from the list and then carry on
> DK> with the test case for Xen and XenFV ?
> 
> Agreed.  At one point, this test did exactly that, and worked on Xen
> systems with no (other) guests defined.
> 

My thinking was that the purpose was to verify the EnumInstance() of CS 
returned no instances when no guests were defined on the system.

I'm not sure I understand the purpose of testing with no other guests 
defined on Xen, because Dom0 is treated as a guest by the providers.

The original code was:

     cs = computersystem.enumerate(options.ip, options.virt)

     if cs.__class__ == str:
         logger.error("Got error instead of empty list: %s" % cs)
         status = FAIL

The error message here is misleading - EnumInstances() won't return an 
empty list on Xen because an instance for Dom0 is returned.  And we're 
not really checking for an empty list anyway.

Is this test really checking to make sure EnumInstances() doesn't return 
an error? If so, the name of the test is misleading.  And other tests 
cover this already (CS 01_enum.py).

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list