[PATCH 0 of 2] [TEST]add more verification and update status description in Processor tc

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1208310365 25200 # Node ID 16d0609fdfaaff43564203dcdd61295baa52b44c # Parent b9ce0dcc277e51d5865b611ebd092874e856bbe2 [TEST] update DeviceID verification in Processor.01 Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r b9ce0dcc277e -r 16d0609fdfaa suites/libvirt-cim/cimtest/Processor/01_processor.py --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Mon Apr 14 01:16:57 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Tue Apr 15 18:46:05 2008 -0700 @@ -32,6 +32,7 @@ from XenKvmLib.vxml import XenXML, KVMXM from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import log_param, logger from CimTest.Globals import do_main +from CimTest.ReturnCodes import PASS, FAIL SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV'] @@ -42,7 +43,7 @@ def main(): def main(): options = main.options log_param() - status = 0 + status = PASS vsxml = get_class(options.virt)(test_dom, vcpus=test_vcpus) vsxml.define(options.ip) vsxml.start(options.ip) @@ -50,7 +51,7 @@ def main(): # Processor instance enumerate need the domain to be active domlist = live.active_domain_list(options.ip, options.virt) if test_dom not in domlist: - status = 1 + status = FAIL logger.error("Domain not started, we're not able to check vcpu") else: for i in range(0, test_vcpus): @@ -62,7 +63,11 @@ def main(): } try: dev = eval(('devices.' + get_typed_class(options.virt, 'Processor')))(options.ip, key_list) - logger.info("Checked device %s" % devid) + if dev.DeviceID == devid: + logger.info("Checked device %s" % devid) + else: + logger.error("Mismatching device, returned %s instead %s" % + (dev.DeviceID, devid)) except Exception, details: logger.error("Error check device %s: %s" % (devid, details)) status = 1

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1208310638 25200 # Node ID dff3b93a6a9faaa73cdd0213d25a6da1680e4fed # Parent 16d0609fdfaaff43564203dcdd61295baa52b44c [TEST] update status description in Processor.02 Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r 16d0609fdfaa -r dff3b93a6a9f suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py --- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Tue Apr 15 18:46:05 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Tue Apr 15 18:50:38 2008 -0700 @@ -39,6 +39,7 @@ from XenKvmLib.common_util import create from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.devices import get_dom_proc_insts from CimTest.Globals import log_param, logger, do_main +from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV'] @@ -49,28 +50,28 @@ def check_processors(procs): if len(procs) != test_vcpus: logger.error("%d vcpu instances were returned. %d expected", len(procs), test_vcpus) - return 1 + return FAIL for proc in procs: if proc['SystemName'] != default_dom: logger.error("Inst returned is for guesst %s, expected guest %s.", procs['SystemName'], default_dom) - return 1 + return FAIL devid = "%s/%s" % (default_dom, test_vcpus - 1) if proc['DeviceID'] != devid: logger.error("DeviceID %s does not match expected %s.", procs['DeviceID'], devid) - return 1 + return FAIL - return 0 + return PASS @do_main(sup_types) def main(): options = main.options log_param() - status = 0 + status = PASS undefine_test_domain(default_dom, options.ip) @@ -94,7 +95,7 @@ def main(): except Exception, detail: logger.error("Exception: %s" % detail) - status = 1 + status = FAIL finally: undefine_test_domain(default_dom, options.ip)

Please ignore the bundles of patch. Thanks! Best, Regards Daisy Guo Lian Yun E-mail: yunguol@cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 libvirt-cim-bounces@redhat.com wrote on 2008-04-16 09:51:44:
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
participants (1)
-
Guo Lian Yun