WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] When redirecting the output of the echo c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] When redirecting the output of the echo command using '>' on bash, the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 17 Sep 2006 17:00:15 +0000
Delivery-date: Sun, 17 Sep 2006 10:01:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 4bac02935c87c92cb72951835fb7b82e83097649
# Parent  2b8dc69744e3ae99d6c59eab7b229ae4259170e3
When redirecting the output of the echo command using '>' on bash, the
output seems to be broken up into multiple write()s (depending on the
version of busybox?). Unfortunately /dev/tpm0 needs to have the complete
command written to in one chunk. The work-around 'echo <string> > file ;
cat file > /dev/tpm0' seems to get around this problem.
The patch also removes a redundant test and error output.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 tools/xm-test/tests/vtpm/06_vtpm-susp_res_pcrs.py |    2 +-
 tools/xm-test/tests/vtpm/07_vtpm-mig_pcrs.py      |    2 +-
 tools/xm-test/tests/vtpm/08_vtpm-mig_pcrs.py      |    2 +-
 tools/xm-test/tests/vtpm/vtpm_utils.py            |    3 ---
 4 files changed, 3 insertions(+), 6 deletions(-)

diff -r 2b8dc69744e3 -r 4bac02935c87 
tools/xm-test/tests/vtpm/06_vtpm-susp_res_pcrs.py
--- a/tools/xm-test/tests/vtpm/06_vtpm-susp_res_pcrs.py Thu Sep 14 07:55:28 
2006 +0100
+++ b/tools/xm-test/tests/vtpm/06_vtpm-susp_res_pcrs.py Thu Sep 14 07:57:41 
2006 +0100
@@ -42,7 +42,7 @@ except ConsoleError, e:
     FAIL("Error while creating /dev/tpm0")
 
 try:
-    run = console.runCmd("echo -ne 
\"\\x00\\xc1\\x00\\x00\\x00\\x22\\x00\\x00\\x00\\x14\\x00\\x00\\x00\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\0xf\\x10\\x11\\x12\\x13\\x14\"
 > /dev/tpm0")
+    run = console.runCmd("echo -ne 
\"\\x00\\xc1\\x00\\x00\\x00\\x22\\x00\\x00\\x00\\x14\\x00\\x00\\x00\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\0xf\\x10\\x11\\x12\\x13\\x14\"
 > seq; cat seq > /dev/tpm0")
 except ConsoleError, e:
     saveLog(console.getHistory())
     vtpm_cleanup(domName)
diff -r 2b8dc69744e3 -r 4bac02935c87 
tools/xm-test/tests/vtpm/07_vtpm-mig_pcrs.py
--- a/tools/xm-test/tests/vtpm/07_vtpm-mig_pcrs.py      Thu Sep 14 07:55:28 
2006 +0100
+++ b/tools/xm-test/tests/vtpm/07_vtpm-mig_pcrs.py      Thu Sep 14 07:57:41 
2006 +0100
@@ -43,7 +43,7 @@ except ConsoleError, e:
     FAIL("Error while creating /dev/tpm0")
 
 try:
-    run = console.runCmd("echo -ne 
\"\\x00\\xc1\\x00\\x00\\x00\\x22\\x00\\x00\\x00\\x14\\x00\\x00\\x00\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\0xf\\x10\\x11\\x12\\x13\\x14\"
 > /dev/tpm0")
+    run = console.runCmd("echo -ne 
\"\\x00\\xc1\\x00\\x00\\x00\\x22\\x00\\x00\\x00\\x14\\x00\\x00\\x00\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\0xf\\x10\\x11\\x12\\x13\\x14\"
 > seq; cat seq > /dev/tpm0")
 except ConsoleError, e:
     saveLog(console.getHistory())
     vtpm_cleanup(domName)
diff -r 2b8dc69744e3 -r 4bac02935c87 
tools/xm-test/tests/vtpm/08_vtpm-mig_pcrs.py
--- a/tools/xm-test/tests/vtpm/08_vtpm-mig_pcrs.py      Thu Sep 14 07:55:28 
2006 +0100
+++ b/tools/xm-test/tests/vtpm/08_vtpm-mig_pcrs.py      Thu Sep 14 07:57:41 
2006 +0100
@@ -43,7 +43,7 @@ except ConsoleError, e:
     FAIL("Error while creating /dev/tpm0")
 
 try:
-    run = console.runCmd("echo -ne 
\"\\x00\\xc1\\x00\\x00\\x00\\x22\\x00\\x00\\x00\\x14\\x00\\x00\\x00\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\0xf\\x10\\x11\\x12\\x13\\x14\"
 > /dev/tpm0")
+    run = console.runCmd("echo -ne 
\"\\x00\\xc1\\x00\\x00\\x00\\x22\\x00\\x00\\x00\\x14\\x00\\x00\\x00\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\0xf\\x10\\x11\\x12\\x13\\x14\"
 > seq; cat seq > /dev/tpm0")
 except ConsoleError, e:
     saveLog(console.getHistory())
     vtpm_cleanup(domName)
diff -r 2b8dc69744e3 -r 4bac02935c87 tools/xm-test/tests/vtpm/vtpm_utils.py
--- a/tools/xm-test/tests/vtpm/vtpm_utils.py    Thu Sep 14 07:55:28 2006 +0100
+++ b/tools/xm-test/tests/vtpm/vtpm_utils.py    Thu Sep 14 07:57:41 2006 +0100
@@ -8,9 +8,6 @@ if ENABLE_HVM_SUPPORT:
 if ENABLE_HVM_SUPPORT:
     SKIP("vtpm tests not supported for HVM domains")
 
-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")
 if output == "":
     FAIL("virtual TPM manager must be started to run this test")

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] When redirecting the output of the echo command using '>' on bash, the, Xen patchbot-unstable <=