[PATCH] Add state transition poll to DestroySystem() call
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1214850941 25200
# Node ID 98e6e7b6160be701c4124cb04eef9c893fdfaa1d
# Parent b123b6b1fb08c3ab956f1c33801e743e082192b9
Add state transition poll to DestroySystem() call.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b123b6b1fb08 -r 98e6e7b6160b src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Fri Jun 27 08:59:09 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Mon Jun 30 11:35:41 2008 -0700
@@ -56,6 +56,7 @@
#define DEFAULT_MAC_PREFIX "00:16:3e"
#define DEFAULT_XEN_WEIGHT 1024
+#define STATE_TRANSITION_TIMEOUT 120
const static CMPIBroker *_BROKER;
@@ -832,6 +833,8 @@
CMPIObjectPath *sys;
virConnectPtr conn = NULL;
virDomainPtr dom = NULL;
+ virDomainInfo info;
+ int i;
conn = connect_by_classname(_BROKER,
CLASSNAME(reference),
@@ -858,6 +861,34 @@
infostore_delete(virConnectGetType(conn), dom_name);
virDomainDestroy(dom); /* Okay for this to fail */
+
+ for (i = 0; i < STATE_TRANSITION_TIMEOUT; i++) {
+ if ((i % 30) == 0) {
+ CU_DEBUG("Polling for destroy completion...");
+ }
+
+ dom = virDomainLookupByName(conn, dom_name);
+ if (dom == NULL) {
+ CU_DEBUG("Domain successfully destroyed");
+ rc = IM_RC_OK;
+ trigger_indication(context,
+ "ComputerSystemDeletedIndication",
+ NAMESPACE(reference));
+ goto error;
+ }
+
+ if (virDomainGetInfo(dom, &info) != 0) {
+ CU_DEBUG("Unable to get domain current state");
+ rc = IM_RC_SYS_NOT_FOUND;
+ goto error;
+ }
+
+ if (info.state == VIR_DOMAIN_SHUTOFF)
+ break;
+
+ sleep(1);
+ }
+
if (virDomainUndefine(dom) == 0) {
rc = IM_RC_OK;
trigger_indication(context,
16 years, 5 months
[PATCH] For pause, reboot, and enable add support for guests in the NOSTATE state
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1214428450 25200
# Node ID bd1ee412c6853d5fd005eca535b0b04446e08fb4
# Parent edf96787c23dc7a91a008916b4b00b22fc22703a
For pause, reboot, and enable add support for guests in the NOSTATE state.
It's possible that a XenFV guest might return no state instead of blocked or running. When xend schedules to guest to run, the guest needs qemu to run (to handle device emulation). If we get the state of the guest before qemu is done running its setup, libvirt reports no state.
This should be a safe approach - we return an error if the guest is in some other state or if libvirt is unable to successfully change the state of the guest.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r edf96787c23d -r bd1ee412c685 src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Wed Jun 25 12:34:09 2008 -0700
+++ b/src/Virt_ComputerSystem.c Wed Jun 25 14:14:10 2008 -0700
@@ -733,6 +733,7 @@
switch (info->state) {
case VIR_DOMAIN_RUNNING:
case VIR_DOMAIN_BLOCKED:
+ case VIR_DOMAIN_NOSTATE:
CU_DEBUG("Pause domain");
ret = virDomainSuspend(dom);
break;
@@ -758,6 +759,7 @@
switch (info->state) {
case VIR_DOMAIN_RUNNING:
case VIR_DOMAIN_BLOCKED:
+ case VIR_DOMAIN_NOSTATE:
CU_DEBUG("Reboot domain");
ret = virDomainReboot(dom, 0);
break;
@@ -783,6 +785,7 @@
switch (info->state) {
case VIR_DOMAIN_RUNNING:
case VIR_DOMAIN_BLOCKED:
+ case VIR_DOMAIN_NOSTATE:
CU_DEBUG("Reset domain");
ret = domain_reset(dom);
break;
16 years, 5 months
[PATCH] [TEST] Fix VirtualSystemSettingDataComponent - 01_forward.py failure
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1214856251 25200
# Node ID 5f49d1d08e8e7f9b905ef77d1a43e4b54917bd03
# Parent 7d3d5dcffad210d1da9f208ce1881f391a21ba9e
[TEST] Fix VirtualSystemSettingDataComponent - 01_forward.py failure.
Test was expecting one ProcRASD for each domain processor. It should expect onky one RASD.
Also updated this test to use PASS/FAIL, removed global variables, and cleaned up indention.
This test will need to be updated to support other XenFV, etc.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 7d3d5dcffad2 -r 5f49d1d08e8e suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Mon Jun 30 12:04:35 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Mon Jun 30 13:04:11 2008 -0700
@@ -58,6 +58,7 @@
from CimTest import Globals
from XenKvmLib import assoc
from CimTest.Globals import logger, do_main
+from CimTest.ReturnCodes import FAIL, PASS
sup_types = ['Xen']
@@ -67,35 +68,30 @@
test_disk = 'xvda'
status = 0
VSType = "Xen"
-vssd_names = []
-vssd_values = []
-RASD_cllist = [
- 'Xen_DiskResourceAllocationSettingData', \
- 'Xen_MemResourceAllocationSettingData', \
- 'Xen_NetResourceAllocationSettingData', \
- 'Xen_ProcResourceAllocationSettingData'
- ]
-
def init_list():
"""
Creating the lists that will be used for comparisons.
"""
- prop_list = []
- prop_list = ["%s/%s" % (test_dom, test_disk), \
- "%s/%s" % (test_dom, "mem"), \
- "%s/%s" % (test_dom, test_mac)
- ]
- proc_list = []
- for i in range(test_vcpus):
- proc_list.append("%s/%s" % (test_dom, i))
- return prop_list, proc_list
+
+ rlist = ['Xen_DiskResourceAllocationSettingData',
+ 'Xen_MemResourceAllocationSettingData',
+ 'Xen_NetResourceAllocationSettingData',
+ 'Xen_ProcResourceAllocationSettingData'
+ ]
+
+ prop_list = {rlist[0] : "%s/%s" % (test_dom, test_disk),
+ rlist[1] : "%s/%s" % (test_dom, "mem"),
+ rlist[2] : "%s/%s" % (test_dom, test_mac),
+ rlist[3] : "%s/%s" % (test_dom, "proc")
+ }
+
+ return prop_list
def build_vssd_info(ip, vssd):
"""
Creating the vssd fileds lists that will be used for comparisons.
"""
- global vssd_names, vssd_values
if vssd.Bootloader == "" or vssd.Caption == "" or \
vssd.InstanceID == "" or vssd.ElementName == "" or \
@@ -105,26 +101,17 @@
test_domain_function(test_dom, ip, "undefine")
sys.exit(status)
- vssd_names = [
- 'Bootloader', \
- 'Caption', \
- 'InstanceID', \
- 'ElementName', \
- 'VirtualSystemIdentifier', \
- 'VirtualSystemType', \
- ]
-
- vssd_values = [
- vssd.Bootloader, \
- vssd.Caption, \
- vssd.InstanceID, \
- vssd.ElementName, \
- vssd.VirtualSystemIdentifier, \
- vssd.VirtualSystemType, \
- ]
+ vssd_vals = {'Bootloader' : vssd.Bootloader,
+ 'Caption' : vssd.Caption,
+ 'InstanceID' : vssd.InstanceID,
+ 'ElementName' : vssd.ElementName,
+ 'VirtualSystemIdentifier' : vssd.VirtualSystemIdentifier,
+ 'VirtualSystemType' : vssd.VirtualSystemType
+ }
+ return vssd_vals
-def assoc_values(ip, assoc_info, cn):
+def assoc_values(ip, assoc_info, cn, an, vals):
"""
The association info of
Xen_VirtualSystemSettingDataComponent with every RASDclass is
@@ -132,36 +119,29 @@
Caption, InstanceID, ElementName, VirtualSystemIdentifier,
VirtualSystemType, Bootloader
"""
- global status
- global vssd_names, vssd_values
try:
if len(assoc_info) != 1:
- Globals.logger.error("Xen_VirtualSystemSettingDataComponent \
-returned %i Resource objects for class '%s'", len(assoc_info),cn)
- status = 1
- return status
+ Globals.logger.error("%s returned %i resource objects for '%s'" % \
+ (an, len(assoc_info), cn))
+ return FAIL
- for idx in range(len(vssd_names)):
- if assoc_info[0][vssd_names[idx]] != vssd_values[idx]:
- Globals.logger.error("%s Mismatch", vssd_names[idx])
- Globals.logger.error("Returned %s instead of %s", \
- assoc_info[0][vssd_names[idx]], \
- vssd_fields[idx])
- status = 1
- if status != 0:
- break
+ for prop, val in vals.iteritems():
+ if assoc_info[0][prop] != val:
+ Globals.logger.error("%s mismatch: returned %s instead of %s" %\
+ (prop, assoc_info[0][prop], val))
+ return FAIL
+
+ return PASS
+
except Exception, detail :
logger.error("Exception in assoc_values function: %s" % detail)
- status = 1
- test_domain_function(test_dom, ip, "undefine")
- return status
-
+ return FAIL
@do_main(sup_types)
def main():
options = main.options
- global status
+ status = FAIL
destroy_and_undefine_all(options.ip)
test_xml = testxml_bl(test_dom, vcpus = test_vcpus, \
@@ -171,9 +151,7 @@
ret = test_domain_function(test_xml, options.ip, cmd = "define")
if not ret:
logger.error("Failed to define the dom: %s", test_dom)
- status = 1
- return status
-
+ return FAIL
instIdval = "%s:%s" % (VSType, test_dom)
keyname = "InstanceID"
@@ -183,48 +161,39 @@
vssd = enumclass.getInstance(options.ip, \
enumclass.Xen_VirtualSystemSettingData, \
key_list)
- build_vssd_info(options.ip, vssd)
+ if vssd is None:
+ logger.error("VSSD instance for %s not found" % test_dom)
+ test_domain_function(test_dom, options.ip, "undefine")
+ return FAIL
+
+ vssd_vals = build_vssd_info(options.ip, vssd)
except Exception, detail :
logger.error(Globals.CIM_ERROR_GETINSTANCE, \
- 'Xen_VirtualSystemSettingData')
+ 'Xen_VirtualSystemSettingData')
logger.error("Exception : %s" % detail)
test_domain_function(test_dom, options.ip, "undefine")
- status = 1
- return status
+ return FAIL
- prop_list, proc_list = init_list()
+ prop_list = init_list()
try:
- idx = 0
- # Looping through the RASD_cllist, call association
- # Xen_VirtualSystemSettingDataComponent with each class in RASD_cllist
- for rasd_cname in RASD_cllist:
- if rasd_cname != 'Xen_ProcResourceAllocationSettingData':
- assoc_info = assoc.Associators(options.ip, \
- 'Xen_VirtualSystemSettingDataComponent', \
- rasd_cname, \
- InstanceID = prop_list[idx])
- # Verify the association fields returned for particular rasd_cname.
- assoc_values(options.ip, assoc_info, rasd_cname)
- idx = idx + 1
- else:
- # Xen_ProcResourceAllocationSettingData, we need to find
- # association information for all the proc InstanceID and hence
- # we loop from 0 to (test_vcpus - 1 )
- for index in range(len(proc_list)):
- assoc_info = assoc.Associators(options.ip, \
- 'Xen_VirtualSystemSettingDataComponent', \
- rasd_cname, \
- InstanceID = prop_list[index])
+ # Looping through the RASD_cllist, call association
+ # Xen_VirtualSystemSettingDataComponent with each class in RASD_cllist
+ an = 'Xen_VirtualSystemSettingDataComponent'
+ for rasd_cname, prop in prop_list.iteritems():
+ assoc_info = assoc.Associators(options.ip, an, rasd_cname,
+ InstanceID = prop)
# Verify the association fields returned for particular rasd_cname.
- assoc_values(options.ip, assoc_info, rasd_cname)
+ status = assoc_values(options.ip, assoc_info, rasd_cname, an,
+ vssd_vals)
+ if status != PASS:
+ break
except Exception, detail :
- logger.error(Globals.CIM_ERROR_ASSOCIATORS, \
- 'Xen_VirtualSystemSettingDataComponent')
+ logger.error(Globals.CIM_ERROR_ASSOCIATORS, an)
logger.error("Exception : %s" % detail)
- status = 1
+ status = FAIL
test_domain_function(test_dom, options.ip, "undefine")
return status
16 years, 5 months
[PATCH] [TEST] Some VirtualSystemManagementService -t 02_destroysystem.py cleanup
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1214852675 25200
# Node ID 7d3d5dcffad210d1da9f208ce1881f391a21ba9e
# Parent 692121d37b3aefafce0d6856d81468add629514d
[TEST] Some VirtualSystemManagementService -t 02_destroysystem.py cleanup.
Add checks to see if the define() / start() calls pass.
Added cleanup_env() function to destroy()/undefine() guest in case of error.
Ensure status is set to PASS only if the guest is not found in the domain list after the DestroySystem() call is made.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 692121d37b3a -r 7d3d5dcffad2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Mon Jun 30 09:58:36 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Mon Jun 30 12:04:35 2008 -0700
@@ -35,47 +35,53 @@
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
default_dom = 'test_domain'
+def cleanup_env(ip, cxml):
+ cxml.destroy(ip)
+ cxml.undefine(ip)
+
@do_main(sup_types)
def main():
options = main.options
service = vsms.get_vsms_class(options.virt)(options.ip)
cxml = vxml.get_class(options.virt)(default_dom)
- cxml.define(options.ip)
- cxml.start(options.ip)
+ ret = cxml.define(options.ip)
+ if not ret:
+ logger.error("Failed to define the dom: %s", default_dom)
+ return FAIL
+ ret = cxml.start(options.ip)
+ if not ret:
+ logger.error("Failed to define the dom: %s", default_dom)
+ cleanup_env(options.ip, cxml)
+ return FAIL
classname = get_typed_class(options.virt, 'ComputerSystem')
cs_ref = CIMInstanceName(classname, keybindings = {
'Name':default_dom,
'CreationClassName':classname})
list_before = domain_list(options.ip, options.virt)
- status = PASS
- rc = -1
+ if default_dom not in list_before:
+ logger.error("Domain not in domain list")
+ cleanup_env(options.ip, cxml)
+ return FAIL
try:
service.DestroySystem(AffectedSystem=cs_ref)
- rc = 0
except Exception, details:
logger.error('Unknow exception happened')
logger.error(details)
- status = FAIL
+ cleanup_env(options.ip, cxml)
+ return FAIL
list_after = domain_list(options.ip, options.virt)
- status = PASS
- if default_dom not in list_before:
- logger.error("Domain not started, check config")
+ if default_dom in list_after:
+ logger.error("Domain %s not destroyed: provider didn't return error" % \
+ default_dom)
+ cleanup_env(options.ip, cxml)
status = FAIL
else:
- destroyed = set(list_before) - set(list_after)
- if len(destroyed) != 1:
- logger.error("Destroyed multiple domains")
- status = FAIL
- elif default_dom not in destroyed:
- logger.error("Wrong domain destroyed")
- status = FAIL
-
- cxml.undefine(options.ip)
+ status = PASS
return status
16 years, 5 months
[PATCH] Fix CSI failure path
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1214857687 25200
# Node ID 02aaaea433146ad4f6dc5c63b34701bc46567fb4
# Parent f72441bf10fdd467d3f47d33e4bfb29537cc53e1
Fix CSI failure path
Since connect_by_classname() can return NULL without it being an
error condition, printing the status message is not valid unless you
check the s.rc field. I don't think the message adds much here, since there
is only one place that the message is filled out, and it's a static string.
Instead, change the debug message to something useful to avoid the SEGV.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r f72441bf10fd -r 02aaaea43314 src/Virt_ComputerSystemIndication.c
--- a/src/Virt_ComputerSystemIndication.c Mon Jun 30 13:12:21 2008 -0700
+++ b/src/Virt_ComputerSystemIndication.c Mon Jun 30 13:28:07 2008 -0700
@@ -339,7 +339,8 @@
conn = connect_by_classname(_BROKER, args->classname, &s);
if (conn == NULL) {
- CU_DEBUG("Failed to connect: %s", CMGetCharPtr(s.msg));
+ CU_DEBUG("Unable to start lifecycle thread: "
+ "Failed to connect (cn: %s)", args->classname);
goto out;
}
16 years, 5 months
[PATCH] Remove explicit "Xen" from VSMS indication trigger
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1214856741 25200
# Node ID f72441bf10fdd467d3f47d33e4bfb29537cc53e1
# Parent 834563d8520b1876d99bf579cc3319b1dfa09795
Remove explicit "Xen" from VSMS indication trigger
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 834563d8520b -r f72441bf10fd src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Mon Jun 30 12:02:43 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Mon Jun 30 13:12:21 2008 -0700
@@ -774,14 +774,14 @@
static bool trigger_indication(const CMPIContext *context,
const char *base_type,
- const char *ns)
+ const CMPIObjectPath *ref)
{
char *type;
CMPIStatus s;
- type = get_typed_class("Xen", base_type);
+ type = get_typed_class(CLASSNAME(ref), base_type);
- s = stdi_trigger_indication(_BROKER, context, type, ns);
+ s = stdi_trigger_indication(_BROKER, context, type, NAMESPACE(ref));
free(type);
@@ -814,7 +814,7 @@
trigger_indication(context,
"ComputerSystemCreatedIndication",
- NAMESPACE(reference));
+ reference);
out:
return s;
}
@@ -862,7 +862,7 @@
rc = IM_RC_OK;
trigger_indication(context,
"ComputerSystemDeletedIndication",
- NAMESPACE(reference));
+ reference);
}
error:
@@ -936,7 +936,7 @@
if (s.rc == CMPI_RC_OK) {
trigger_indication(context,
"ComputerSystemModifiedIndication",
- NAMESPACE(ref));
+ ref);
}
out:
16 years, 5 months
[PATCH 0 of 3] Indications for state changes
by Dan Smith
This set:
- Makes domain state an explicit factor in the dom_changed() determination
for CSI
- Makes CS trigger CSI on state change to avoid waiting for the loop
- Fixes up registration of KVM_ and LXC_ CSI variants
16 years, 5 months
[PATCH] [TEST] Fixing the ComputerSystem tc's
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1214830309 25200
# Node ID 197ecb3db922d841a2cdfbcdec5a4bf149dddc83
# Parent 0c3bd5f782c4776719799ad5c74226c95e70092e
[TEST] Fixing the ComputerSystem tc's.
Updated the tc to report XFAIL since the tc are failing as the requested_state property is not being set appropriately.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Mon Jun 30 05:51:49 2008 -0700
@@ -52,7 +52,8 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
SUSPND_STATE = 9
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -61,13 +62,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -106,8 +109,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jun 30 05:51:49 2008 -0700
@@ -51,7 +51,8 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
REBOOT_STATE = 10
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -60,13 +61,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -105,8 +108,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Mon Jun 30 05:51:49 2008 -0700
@@ -54,7 +54,8 @@ SUSPND_STATE = 9
SUSPND_STATE = 9
REBOOT_STATE = 10
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -63,13 +64,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -109,8 +112,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
diff -r 0c3bd5f782c4 -r 197ecb3db922 suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Fri Jun 27 09:57:11 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Jun 30 05:51:49 2008 -0700
@@ -52,7 +52,8 @@ ACTIVE_STATE = 2
ACTIVE_STATE = 2
RESET_STATE = 11
-bug = "00001"
+bug = "00001"
+bug_req_state = "00002"
default_dom = 'test_domain'
TIME = "00000000000000.000000:000"
@@ -61,13 +62,15 @@ def check_attributes(domain_name, ip, en
if rc != 0:
return rc
if cs.RequestedState != rq_state:
- logger.error("RequestedState should be %d not %d", \
+ logger.error("RequestedState should be %d not %d",
rq_state, cs.RequestedState)
- return FAIL
+ return XFAIL_RC(bug_req_state)
+
if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d", \
+ logger.error("EnabledState should be %d not %d",
en_state, cs.EnabledState)
return FAIL
+
return PASS
@do_main(sup_types)
@@ -106,8 +109,8 @@ RequestedStateChange()", action, default
status = check_attributes(default_dom, options.ip,
en_state, rq_state, options.virt)
if status != PASS:
- logger.error("Attributes for dom %s not set as expected.", \
- default_dom)
+ logger.error("Attributes for dom %s not set as expected.",
+ default_dom)
break
except Exception, detail:
16 years, 5 months
[PATCH] [TEST] Fix HostSystem - 04_hs_to_EAPF.py to verify proper mem val
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1214845116 25200
# Node ID 692121d37b3aefafce0d6856d81468add629514d
# Parent 450c5a235e0c95d7be7ef4a967fcb30d2f2abb9c
[TEST] Fix HostSystem - 04_hs_to_EAPF.py to verify proper mem val
The memory value used for NumberOfBlocks needs to be multiplied by 1024, since the memory value supplied when the guest is created is multiplied by 1024.
Also removed an extraneous print statement. Removed some functions that were no longer being used. Also fixed some line length issues.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 450c5a235e0c -r 692121d37b3a suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Mon Jun 30 09:27:42 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Mon Jun 30 09:58:36 2008 -0700
@@ -76,8 +76,9 @@
def setup_env(server):
destroy_and_undefine_all(server)
- test_xml, bridge = testxml_bridge(test_dom, mem = test_mem, vcpus = test_vcpus, \
- mac = test_mac, disk = test_disk, server = server)
+ test_xml, bridge = testxml_bridge(test_dom, mem = test_mem,
+ vcpus = test_vcpus, mac = test_mac,
+ disk = test_disk, server = server)
if bridge == None:
logger.error("Unable to find virtual bridge")
return SKIP
@@ -100,14 +101,6 @@
def print_err(err, detail, cn):
logger.error(err % cn)
logger.error("Exception: %s", detail)
-
-def field_err(assoc_info, field_list, fieldname):
- logger.error("%s Mismatch", fieldname)
- logger.error("Returned %s instead of %s", assoc_info[fieldname], field_list[fieldname])
-
-def spec_err(fieldvalue, field_list, fieldname):
- logger.error("%s Mismatch", fieldname)
- logger.error("Returned %s instead of %s", fieldvalue, field_list[fieldname])
def pool_init_list(pool_assoc):
"""
@@ -142,14 +135,13 @@
'SystemName' : test_dom,
'CreationClassName' : "Xen_Memory",
'DeviceID' : "%s/%s" % (test_dom, "mem"),
- 'NumberOfBlocks' : test_mem
+ 'NumberOfBlocks' : test_mem * 1024
}
eaf_values = { "Xen_Processor" : proc,
"Xen_LogicalDisk" : disk,
"Xen_NetworkPort" : net,
"Xen_Memory" : mem
}
- print eaf_values
return eaf_values
def get_inst_for_dom(assoc_val):
@@ -171,7 +163,8 @@
CreationClassName=cn,
Name = hostname)
if len(assoc_info) < 1:
- logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn))
+ logger.error("%s returned %i %s objects" % (an,
+ len(assoc_info), qcn))
status = FAIL
except Exception, detail:
@@ -186,7 +179,8 @@
def check_len(an, assoc_list_info, qcn, exp_len):
if len(assoc_list_info) != exp_len:
- logger.error("%s returned %i %s objects" % (an, len(assoc_list_info), qcn))
+ logger.error("%s returned %i %s objects" % (an,
+ len(assoc_list_info), qcn))
return FAIL
return PASS
16 years, 5 months
Cimtest Report for LXC on F9 (2008/06/30)
by Guo Lian Yun
stro: Fedora 9 Beta
kernel-2.6.25-0.218.rc8.git7.fc9.x86_64
CIMOM: tog-pegasus-2.7.0-6.fc9.x86_64
cimtest: changeset-227
==================================================================
PASS : 88
FAIL : 2
XFAIL : 1
SKIP : 38
-----------------
Total : 129
========================= FAILED
==========================================
ComputerSystem - 04_defineStartVS.py: FAIL
ERROR - Error: property values are not set for VS domguest
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - HostedResourcePool has returned 3 instances, expected 4
instances
======================CIMTEST FULL
REPORT==================================
AllocationCapabilities - 01_enum.py: PASS
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
ComputerSystem - 01_enum.py: PASS
ComputerSystem - 02_nosystems.py: PASS
ComputerSystem - 03_defineVS.py: PASS
ComputerSystem - 04_defineStartVS.py: FAIL
ERROR - Error: property values are not set for VS domguest
ComputerSystem - 05_activate_defined_start.py: XFAIL Bug: 00002
ERROR - ERROR: VS DomST1 transition from Defined State to Activate state
was not Successful
Bug:<00002>
ComputerSystem - 06_paused_active_suspend.py: SKIP
ComputerSystem - 22_define_suspend.py: PASS
ComputerSystem - 23_suspend_suspend.py: SKIP
ComputerSystem - 27_define_suspend_errs.py: PASS
ComputerSystem - 32_start_reboot.py: SKIP
ComputerSystem - 33_suspend_reboot.py: SKIP
ComputerSystem - 35_start_reset.py: SKIP
ComputerSystem - 40_RSC_start.py: SKIP
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystem - 42_cs_gi_errs.py: PASS
ComputerSystemIndication - 01_created_indication.py: SKIP
ElementAllocatedFromPool - 01_forward.py: SKIP
ElementAllocatedFromPool - 02_reverse.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: SKIP
ElementAllocatedFromPool - 04_forward_errs.py: SKIP
ElementCapabilities - 01_forward.py: PASS
ElementCapabilities - 02_reverse.py: PASS
ElementCapabilities - 03_forward_errs.py: PASS
ElementCapabilities - 04_reverse_errs.py: PASS
ElementCapabilities - 05_hostsystem_cap.py: PASS
ElementConforms - 01_forward.py: PASS
ElementConforms - 02_reverse.py: PASS
ElementConforms - 03_ectp_fwd_errs.py: PASS
ElementConforms - 04_ectp_rev_errs.py: PASS
ElementSettingData - 01_forward.py: PASS
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
EnabledLogicalElementCapabilities - 01_enum.py: PASS
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
HostSystem - 01_enum.py: PASS
HostSystem - 02_hostsystem_to_rasd.py: PASS
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - HostedResourcePool has returned 3 instances, expected 4
instances
HostSystem - 04_hs_to_EAPF.py: SKIP
HostSystem - 05_hs_gi_errs.py: PASS
HostSystem - 06_hs_to_vsms.py: PASS
HostedDependency - 01_forward.py: PASS
HostedDependency - 02_reverse.py: PASS
HostedDependency - 03_enabledstate.py: SKIP
HostedDependency - 04_reverse_errs.py: PASS
HostedResourcePool - 01_forward.py: PASS
HostedResourcePool - 02_reverse.py: PASS
HostedResourcePool - 03_forward_errs.py: PASS
HostedResourcePool - 04_reverse_errs.py: PASS
HostedService - 01_forward.py: PASS
HostedService - 02_reverse.py: PASS
HostedService - 03_forward_errs.py: PASS
HostedService - 04_reverse_errs.py: PASS
LogicalDisk - 01_disk.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
LogicalDisk - 03_ld_gi_errs.py: SKIP
Memory - 01_memory.py: PASS
Memory - 02_defgetmem.py: PASS
Memory - 03_mem_gi_errs.py: PASS
NetworkPort - 01_netport.py: SKIP
NetworkPort - 02_np_gi_errors.py: SKIP
NetworkPort - 03_user_netport.py: SKIP
Processor - 01_processor.py: SKIP
Processor - 02_definesys_get_procs.py: SKIP
Processor - 03_proc_gi_errs.py: SKIP
Profile - 01_enum.py: PASS
Profile - 02_profile_to_elec.py: SKIP
Profile - 03_rprofile_gi_errs.py: PASS
RASD - 01_verify_rasd_fields.py: PASS
RASD - 02_enum.py: PASS
RASD - 03_rasd_errs.py: PASS
ReferencedProfile - 01_verify_refprof.py: PASS
ReferencedProfile - 02_refprofile_errs.py: PASS
ResourceAllocationFromPool - 01_forward.py: PASS
ResourceAllocationFromPool - 02_reverse.py: PASS
ResourceAllocationFromPool - 03_forward_errs.py: PASS
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
ResourcePool - 01_enum.py: PASS
ResourcePool - 02_rp_gi_errors.py: PASS
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
ResourcePoolConfigurationService - 01_enum.py: PASS
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
SKIP
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: PASS
SettingsDefine - 03_sds_fwd_errs.py: PASS
SettingsDefine - 04_sds_rev_errs.py: PASS
SettingsDefineCapabilities - 01_forward.py: PASS
SettingsDefineCapabilities - 03_forward_errs.py: PASS
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
SystemDevice - 01_forward.py: PASS
SystemDevice - 02_reverse.py: PASS
SystemDevice - 03_fwderrs.py: PASS
VSSD - 01_enum.py: PASS
VSSD - 02_bootldr.py: SKIP
VSSD - 03_vssd_gi_errs.py: PASS
VSSD - 04_vssd_to_rasd.py: PASS
VirtualSystemManagementCapabilities - 01_enum.py: PASS
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
VirtualSystemManagementService - 01_definesystem_name.py: PASS
VirtualSystemManagementService - 02_destroysystem.py: PASS
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
VirtualSystemManagementService - 06_addresource.py: SKIP
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: SKIP
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationSettingData - 01_enum.py: PASS
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
VirtualSystemSettingDataComponent - 01_forward.py: SKIP
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
VirtualSystemSnapshotService - 01_enum.py: PASS
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py:
PASS
Best,
Regards
Daisy (运国莲)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol(a)cn.ibm.com
TEL: (86)-21-60922144
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203
16 years, 5 months