aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/tests
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-03-09 02:32:52 +0000
committerEwan Mellor <ewan@xensource.com>2007-03-09 02:32:52 +0000
commit81c452f998a0cafbca47b350e521a62cc7014d6a (patch)
treef8df1edf5ce2f1fe3706db8e0190b3586a9409d8 /tools/xm-test/tests
parent99598dfc8a2e394eee9448ede3d6bd5d7750973b (diff)
downloadxen-81c452f998a0cafbca47b350e521a62cc7014d6a.tar.gz
xen-81c452f998a0cafbca47b350e521a62cc7014d6a.tar.bz2
xen-81c452f998a0cafbca47b350e521a62cc7014d6a.zip
Make the VTPM.destroy method return 'void' upon success and adapt the
test case to reflect that. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Diffstat (limited to 'tools/xm-test/tests')
-rw-r--r--tools/xm-test/tests/vtpm/09_vtpm-xapi.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py
index 6a17c51045..6de28805d3 100644
--- a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py
+++ b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py
@@ -113,7 +113,7 @@ if not re.search("PCR-00:",run["output"]):
FAIL("1. Virtual TPM is not working correctly on /dev/vtpm on backend side: \n%s" % run["output"])
try:
- rc = session.xenapi.VTPM.destroy(vtpm_uuid)
+ session.xenapi.VTPM.destroy(vtpm_uuid)
#Should never get here
FAIL("Could destroy vTPM while VM is running")
except:
@@ -124,7 +124,7 @@ if rc:
FAIL("Could not suspend VM")
try:
- rc = session.xenapi.VTPM.destroy(vtpm_uuid)
+ session.xenapi.VTPM.destroy(vtpm_uuid)
#May not throw an exception in 'suspend' state
except:
pass
@@ -150,8 +150,9 @@ if not re.search("PCR-00:",run["output"]):
domain.stop()
-rc = session.xenapi.VTPM.destroy(vtpm_uuid)
-if not rc:
+try:
+ session.xenapi.VTPM.destroy(vtpm_uuid)
+except:
FAIL("Could NOT destroy vTPM while domain is halted.")
domain.destroy()