[PATCH] [TEST] #2 Fixing 03_user_netport.py tc

# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1213864932 25200 # Node ID 0986ab7af5023cac28da15c59fffcca60c78866c # Parent fc18447de1be94d839fdb1619811c1294bb279f9 [TEST] #2 Fixing 03_user_netport.py tc. Changes: -------
From patch 1 to 2:
1) Modified the verification of the device.DeviceID from None to devid. 2) Modifed the log message to make it more meaningful. Patch 1: ------- 1) Changed the return value to XFAIL since the provider does not support guest with user interface type. 2) Fixed the KeyError. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r fc18447de1be -r 0986ab7af502 suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Wed Jun 18 06:00:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Thu Jun 19 01:42:12 2008 -0700 @@ -32,18 +32,18 @@ from XenKvmLib.vxml import KVMXML from XenKvmLib.vxml import KVMXML from CimTest.Globals import logger from CimTest.Globals import do_main -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC sup_types = ['KVM'] test_dom = "test_domain" test_mac = "00:11:22:33:44:55" +bug = '00004' @do_main(sup_types) def main(): options = main.options - const.KVM_default_net_type = 'user' - cxml = KVMXML(test_dom, mac = test_mac) + cxml = KVMXML(test_dom, mac = test_mac, ntype='user') ret = cxml.define(options.ip) if not ret: logger.error('Unable to define domain %s' % test_dom) @@ -62,10 +62,11 @@ def main(): except Exception, detail: logger.error("Exception: %s" % detail) cxml.undefine(options.ip) - return FAIL + return XFAIL_RC(bug) - if dev == None: - logger.error("Error retrieving instance for devid %s" % devid) + if dev.DeviceID != devid: + logger.error("DeviceID reported incorrectly (%s instead of %s)", + dev.DeviceID, devid) cxml.undefine(options.ip) return FAIL
participants (1)
-
Deepti B. Kalakeri