All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [Xen-API] make VTPM.destroy return void upon success
@ 2007-02-23 15:41 Stefan Berger
  2007-03-09  2:33 ` Ewan Mellor
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2007-02-23 15:41 UTC (permalink / raw)
  To: Xen-devel; +Cc: ewan

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

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>


[-- Attachment #2: vtpm_destroy_returns_void.diff --]
[-- Type: text/x-patch, Size: 1661 bytes --]

diff -r f62a052384a5 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py	Wed Feb 21 18:38:11 2007 -0800
+++ b/tools/python/xen/xend/XendAPI.py	Fri Feb 23 10:33:54 2007 -0500
@@ -1900,7 +1900,7 @@ class XendAPI(object):
                  XendDomain.POWER_STATE_NAMES[dom.state]])
             from xen.xend.server import tpmif
             tpmif.destroy_vtpmstate(dom.getName())
-            return xen_api_success(True)
+            return xen_api_success_void()
         else:
             return xen_api_error(['HANDLE_INVALID', 'VM', vtpm_struct['VM']])
 
diff -r f62a052384a5 tools/xm-test/tests/vtpm/09_vtpm-xapi.py
--- a/tools/xm-test/tests/vtpm/09_vtpm-xapi.py	Wed Feb 21 18:38:11 2007 -0800
+++ b/tools/xm-test/tests/vtpm/09_vtpm-xapi.py	Fri Feb 23 10:36:26 2007 -0500
@@ -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()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [Xen-API] make VTPM.destroy return void upon success
  2007-02-23 15:41 [PATCH] [Xen-API] make VTPM.destroy return void upon success Stefan Berger
@ 2007-03-09  2:33 ` Ewan Mellor
  0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2007-03-09  2:33 UTC (permalink / raw)
  To: Stefan Berger; +Cc: Xen-devel

On Fri, Feb 23, 2007 at 10:41:22AM -0500, Stefan Berger wrote:

> 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>

Applied.

Ewan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-09  2:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-23 15:41 [PATCH] [Xen-API] make VTPM.destroy return void upon success Stefan Berger
2007-03-09  2:33 ` Ewan Mellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.