# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1210559507 25200
# Node ID 0647d07426408da321b42cb23eaefab0032f50e6
# Parent 336c6f965baed9b56b484507171ad940e09e6096
[TEST] Capture return from create_using_definesystem() in 01_created_indication.py
This test was returning a false positive in the case where create_using_definesystem()
fails.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 336c6f965bae -r 0647d0742640
suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py
--- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Wed May
07 09:54:57 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Sun May
11 19:31:47 2008 -0700
@@ -63,7 +63,13 @@
else:
sys.exit(0)
else:
- create_using_definesystem(test_dom, options.ip, None, None, options.virt)
+ status = create_using_definesystem(test_dom, options.ip, None, None,
options.virt)
+ if status != PASS:
+ sub.unsubscribe(dict['default_auth'])
+ logger.info("Cancelling subscription for %s" %
indication_name)
+ os.kill(pid, signal.SIGKILL)
+ return status
+
for i in range(0,100):
pw = os.waitpid(pid, os.WNOHANG)[1]
if pw == 0: