+@do_main(sup_types)
+def main():
+ options = main.options
+ libvirtcim_hr_crs_changes = 688
+ status = PASS
This should be status = FAIL. If you set status = PASS at the beginning
of the test, it's possible for the test to return a false positive (in
the case when the status variable isn't updated with the failure properly).
+
+ # Looping by passing invalid key values
+ for field, test_val in tc_scen.items():
+ newkey_vals = key_vals.copy()
+ newkey_vals[test_val] = field
+ ret_value = try_getinstance(conn, classname, newkey_vals,
+ field_name=test_val,
+ expr_values = expr_values[field],
+ bug_no = "")
+ if ret_value != PASS:
+ logger.error(" -------------- FAILED %s ----------- : " % field)
+ status = ret_value
There's no need for the ret_value variable. Just use "status" to
capture the return value of try_getinstance().
Thanks!
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com