[PATCH] [TEST] Fix HostSystem/01_enum.py test
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1301597899 25200
# Node ID 434ee28b0c8000175c81ea7291d7bcf01756cfdd
# Parent e71cf5aa81f77498c18ad7d870a41ed9760d3c06
[TEST] Fix HostSystem/01_enum.py test
This test was not taking into account the localhost discovered by sblim providers.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r e71cf5aa81f7 -r 434ee28b0c80 suites/libvirt-cim/cimtest/HostSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Mon Mar 07 17:40:29 2011 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Thu Mar 31 11:58:19 2011 -0700
@@ -55,8 +55,12 @@
if ret == PASS:
if len(hs) != 0:
- logger.error("Unexpected instance returned")
- return FAIL
+ if hs[0].CreationClassName != name or hs[0].Name != host:
+ logger.error("Exp %s, got %s", name, hs[0].CreationClassName)
+ logger.error("Exp %s, got %s", host, hs[0].Name)
+ return FAIL
+ else:
+ return PASS
else:
if linux_cs.CreationClassName != 'Linux_ComputerSystem'\
or linux_cs.Name != host:
13 years, 6 months
[PATCH] [TEST] Conditionally fail if VSI hardware not available
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1301604632 25200
# Node ID c1d9565fff50d8aaa7990088b16a8364f563187a
# Parent 6d7dab79f4e8806aea65cb413c4f193cdbfc4f40
[TEST] Conditionally fail if VSI hardware not available.
This test requires VSI capable hardware to run successfully.
On non-vsi hosts, the test was failing, changed it to fail
conditionally now giving detailed cause of failure.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 6d7dab79f4e8 -r c1d9565fff50 suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py Thu Mar 31 13:40:51 2011 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py Thu Mar 31 13:50:32 2011 -0700
@@ -179,29 +179,34 @@
try:
rasd_list = get_rasd_list(server, virt, vsi_defaults, nrasd_cn)
if len(rasd_list) < 1:
+ status = FAIL
raise Exception("Unable to get template RASDs for %s" % test_dom)
cxml = get_class(virt)(test_dom)
cxml.set_res_settings(rasd_list)
ret = cxml.cim_define(server)
if not ret:
+ status = FAIL
raise Exception("Unable to define guest %s" % test_dom)
status = cxml.cim_start(server)
if status != PASS:
- raise Exception("Unable to start %s" % test_dom)
+ status = XFAIL
+ raise Exception("Unable to start VM "
+ "*** Is VSI support available on this host? ***")
status, inst = get_net_inst(server, nrasd_cn, test_dom)
if status != PASS:
+ status = FAIL
raise Exception("Failed to get net interface for %s" % test_dom)
status = verify_net_rasd(server, virt, vsi_defaults, inst)
if status != PASS:
+ status = FAIL
logger.error("Failed to verify net interface for %s", test_dom)
except Exception, details:
logger.error(details)
- status = FAIL
cxml.cim_destroy(server)
cxml.undefine(server)
13 years, 6 months