From: Stefan Berger Subject: [PATCH] [XMTEST] Fix for testing for device file Date: Tue, 21 Mar 2006 12:02:20 -0500 Message-ID: <1142960540.6240.3.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-dTv3edyz070td6IMlkAP" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: ewan@xensource.com List-Id: xen-devel@lists.xenproject.org --=-dTv3edyz070td6IMlkAP Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-dTv3edyz070td6IMlkAP Content-Disposition: attachment; filename=xmtest_fix.diff Content-Type: text/x-patch; name=xmtest_fix.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: xen/xen-unstable.hg/tools/xm-test/tests/vtpm/vtpm_utils.py =================================================================== --- xen.orig/xen-unstable.hg/tools/xm-test/tests/vtpm/vtpm_utils.py +++ 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") --=-dTv3edyz070td6IMlkAP Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-dTv3edyz070td6IMlkAP--