[Libvirt-cim] [PATCH 2 of 6] [TEST] update processor id in Processor01~03 to reflect recent provider changes

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Fri Apr 11 14:09:52 UTC 2008



Guo Lian Yun wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at cn.ibm.com>
> # Date 1207878768 25200
> # Node ID 1a230184a44b133bb453d9f4582a0ff6e9ea5696
> # Parent  16ad6528cd7d7ef367d354c1cadd0d258fa09e0a
> [TEST] update processor id in Processor01~03 to reflect recent provider changes
>
> Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
>
> diff -r 16ad6528cd7d -r 1a230184a44b suites/libvirt-cim/cimtest/Processor/01_processor.py
> --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py	Thu Apr 10 18:49:55 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py	Thu Apr 10 18:52:48 2008 -0700
> @@ -54,7 +54,7 @@ def main():
>          logger.error("Domain not started, we're not able to check vcpu")
>      else:
>          for i in range(0, test_vcpus):
>   
The for loop is not required anymore, since we get only one record 
irrespective of the vcpus assigned to the domain.
> -            devid = "%s/%s" % (test_dom, i)
> +            devid = "%s/%s" % (test_dom, "proc")
>              key_list = { 'DeviceID' : devid,
>                           'CreationClassName' : get_typed_class(options.virt, "Processor"),
>                           'SystemName' : test_dom
>   
As of now, the test case just gives a log msg, it can be improved by 
verifying the DeviceID returned as below:
if dev.DeviceID != devid:
logger.info("Mismatching device, returned %s instead %s" % 
(dev.DeviceID, devid))
break

> diff -r 16ad6528cd7d -r 1a230184a44b suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py
> --- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py	Thu Apr 10 18:49:55 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py	Thu Apr 10 18:52:48 2008 -0700
> @@ -57,7 +57,7 @@ def check_processors(procs):
>                           procs['SystemName'], default_dom)
>              return 1
>
> -        devid = "%s/%s" % (default_dom, test_vcpus - 1)
> +        devid = "%s/%s" % (default_dom, "proc")
>   
looks good.
The tc fails for XenFV with the following error:

CIM_ERR_FAILED: A general error occurred that is not covered by a more 
specific error code: "Failed to create domain"
ERROR - Unexpected rc code 1 and description:
ERROR - Exception: Unable create domain test_domain using DefineSystem()

May be this is an issue on my machine only.
Also, for setting the status values can we use PASS, FAIL ?
As of now the above two tc used 0, 1 for this.
>          if proc['DeviceID'] != devid: 
>              logger.error("DeviceID %s does not match expected %s.", 
> diff -r 16ad6528cd7d -r 1a230184a44b suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py	Thu Apr 10 18:49:55 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py	Thu Apr 10 18:52:48 2008 -0700
> @@ -174,7 +174,7 @@ def main():
>      options = main.options
>      log_param()
>
> -    devid = "%s/%s" % (test_dom, "0")
> +    devid = "%s/%s" % (test_dom, "proc")
>   
Looks good.
>      status = PASS
>
>      # Getting the VS list and deleting the test_dom if it already exists.
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>   




More information about the Libvirt-cim mailing list