
Chip, Return code is not the issue. It is the error message that had changed. This test compares the error message with the expected error message. Since libvirt-cim does not care about the actual error message, we are okay there. Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces@redhat.com wrote on 04/01/2011 05:51:47 AM:
Chip Vincent <cvincent@linux.vnet.ibm.com> Sent by: libvirt-cim-bounces@redhat.com
04/01/11 05:51 AM
Please respond to cvincent@linux.vnet.ibm.com; Please respond to List for discussion and development of libvirt CIM <libvirt-cim@redhat.com>
To
libvirt-cim@redhat.com
cc
Subject
Re: [Libvirt-cim] [PATCH] [TEST] Fixing testcase to account for different libvirt error string
+1. Are changes needed in libvirt-cim to handle this case? That is, will a change in libvirt return codes break libvirt-cim?
On 03/31/2011 04:42 PM, Sharad Mishra wrote:
# HG changeset patch # User Sharad Mishra<snmishra@us.ibm.com> # Date 1301604051 25200 # Node ID 6d7dab79f4e8806aea65cb413c4f193cdbfc4f40 # Parent f0a7eee4cbe06cc4f618770ac149218a1bddb171 [TEST] Fixing testcase to account for different libvirt error string.
Noticed that this test was failing on some libvirt versions between 0.7.0 and 0.8.7 because libvirt was returning new error message. Latest libvirt (0.8.7-5) is back to using error string from libvirt versions prior to 0.7.0.
Signed-off-by: Sharad Mishra<snmishra@us.ibm.com>
diff -r f0a7eee4cbe0 -r 6d7dab79f4e8 suites/libvirt-cim/cimtest/ VirtualSystemManagementService/19_definenetwork_ers.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/ 19_definenetwork_ers.py Thu Mar 31 12:32:11 2011 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/ 19_definenetwork_ers.py Thu Mar 31 13:40:51 2011 -0700 @@ -125,10 +125,17 @@ if not ret: status = verify_error(exp_rc, exp_desc, cxml) if status != PASS: - raise Exception('Defing domain with invalid %s name %s' - ' gave unexpected rc code %s and ' - 'description:\n %s'% (nettype, field, - cxml.err_rc, cxml.err_desc)) + # There are few libvirt version between 0.7.0 + # and 0.8.7 which give following error. + status = verify_error(exp_rc, + 'No Network bridge name specified', + cxml) + if status != PASS: + raise Exception('Defining domain with invalid %s' + ' name %s gave unexpected rc code' + ' %s and description:\n' + ' %s'% (nettype, field, + cxml.err_rc, cxml.err_desc)) continue ret = cxml.cim_start(options.ip) if ret:
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim