ia64/xen-unstable

view tools/xm-test/tests/vtpm/vtpm_utils.py @ 9377:22f1618cf57c

The patch fixes a problem when testing for device /dev/tpm0. The API
call os.path.exists() must be called instead of os.path.isfile().

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author emellor@leeni.uk.xensource.com
date Tue Mar 21 18:57:23 2006 +0100 (2006-03-21)
parents a66c48bdf9c3
children d85488fd2196
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2006
4 # Author: Stefan Berger <stefanb@us.ibm.com>
6 from XmTestLib import *
8 if ENABLE_HVM_SUPPORT:
9 SKIP("vtpm tests not supported for HVM domains")
11 if not os.path.exists("/dev/tpm0"):
12 SKIP("This machine has no hardware TPM; cannot run this test")
14 status, output = traceCommand("ps aux | grep vtpm_manager | grep -v grep")
15 if output == "":
16 FAIL("virtual TPM manager must be started to run this test")
18 def vtpm_cleanup(domName):
19 traceCommand("/etc/xen/scripts/vtpm-delete %s" % domName)