[Libvirt-cim] [PATCH 1 of 2] [TEST] Created testcases for the forward HostedAccessPoint association (HostSystem -> KVMRedirectionSAP

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Fri Feb 6 20:28:04 UTC 2009


> +
> +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
> +
> +test_dom = "domu1"
> +
> +def setup_env(server, virt):
> +    if virt == 'Xen':
> +        test_disk = 'xvda'
> +    else:
> +        test_disk = 'hda'
> +        virt_xml = get_class(virt)

> +        if virt == 'LXC':
> +            cxml = virt_xml(test_dom)
> +        else:
> +            cxml = virt_xml(test_dom, disk = test_disk)

These 4 lines shouldn't be under the else.  On Xen systems, you don't 
assign cxml.  I didn't notice this during the last review.

Also, the KVMRedirectionSAP provider was introduced in changeset 716. 
So you'll need to have this test return SKIP if the provider version is 
older than that. Otherwise, this test will fail when run with older 
providers.  See test KVMRedirectionSAP/01_enum_KVMredSAP.py for an 
example on how to branch this test.

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




More information about the Libvirt-cim mailing list