# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1218519475 25200
# Node ID b4a54ba548b4d34c485dc04d1fc5dba257e40446
# Parent 98f69895a4dcc3d314d41611cf67f51329e15a44
[TEST] Fix VSMS - 05_destroysystem_neg.py to work for both Pegasus and sfcb
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 98f69895a4dc -r b4a54ba548b4
suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py
---
a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Fri
Aug 08 11:01:29 2008 -0700
+++
b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Mon
Aug 11 22:37:55 2008 -0700
@@ -40,23 +40,35 @@
classname = get_typed_class(options.virt, 'ComputerSystem')
+ cmd = "lsof -P -i:5988 | grep sfcbd"
+ rc, out = utils.run_remote(options.ip, cmd)
+
if tc == 'noname':
cs_ref = CIMInstanceName(classname,
keybindings = {'CreationClassName':classname})
- exp_value = { 'rc' : pywbem.CIM_ERR_FAILED,
- 'desc' : 'CIM_ERR_FAILED: Unable to retrieve domain\
- name.'
- }
+ if rc == 0:
+ exp_value = { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'Unable to retrieve domain name.'
+ }
+ else:
+ exp_value = { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'CIM_ERR_FAILED: Unable to retrieve
domain name.'
+ }
elif tc == 'nonexistent':
cs_ref = CIMInstanceName(classname,keybindings = {
'Name':'##@@!!cimtest_domain',
'CreationClassName':classname})
- exp_value = { 'rc' : pywbem.CIM_ERR_FAILED,
- 'desc' : 'CIM_ERR_FAILED: Failed to find domain'
- }
+ if rc == 0:
+ exp_value = { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'Failed to find domain'
+ }
+ else:
+ exp_value = { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'CIM_ERR_FAILED: Failed to find
domain'
+ }
else:
return SKIP