+def verify_err_desc(exp_rc, exp_desc, err_no, err_desc):
+ if err_no == exp_rc and err_desc.find(exp_desc) >= 0:
+ logger.info("Got expected exception where ")
+ logger.info("Errno is '%s' ", exp_rc)
+ logger.info("Error string is '%s'", exp_desc)
+ return PASS
+ else:
+ logger.error("Unexpected rc code %s and description %s\n",
+ (err_no, err_desc))
+ return FAIL
+\
I don't think we need to add this to a common library. The libraries
are becoming cluttered, and it's often difficult to tell what library a
function comes from.
Checking an error description is fairly trivial and something that each
test case can handle as needed.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com