Skip to contentSkip to conversation

Fix for testing for device file

PATCH Applied Stefan Berger 2 participants 2 messages Mar 21, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for testing for device file

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().

xen-unstable.hg/tools/xm-test/tests/vtpm/vtpm_utils.py +1 -1
Index: xen/xen-unstable.hg/tools/xm-test/tests/vtpm/vtpm_utils.py
===================================================================
@@ -8,7 +8,7 @@ from XmTestLib import *
 if ENABLE_HVM_SUPPORT:
     SKIP("vtpm tests not supported for HVM domains")
 
-if not os.path.isfile("/dev/tpm0"):
+if not os.path.exists("/dev/tpm0"):
     SKIP("This machine has no hardware TPM; cannot run this test")
 
 status, output = traceCommand("ps aux | grep vtpm_manager | grep -v grep")

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw
Quoted 4 lines · Stefan Berger

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().

Applied, thanks. Sorry, for breaking it in the first place.

Ewan.