aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/lib/XmTestLib/Console.py
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2006-10-23 10:16:20 +0100
committerEwan Mellor <ewan@xensource.com>2006-10-23 10:16:20 +0100
commit1cbb1ec85e90017d6d89fbe40bed7f56090b9099 (patch)
treea9f4162cb4bccd054a535adde4ffc476fe045017 /tools/xm-test/lib/XmTestLib/Console.py
parent7c0553c867e4a218a5a0254001b26576432d63e9 (diff)
downloadxen-1cbb1ec85e90017d6d89fbe40bed7f56090b9099.tar.gz
xen-1cbb1ec85e90017d6d89fbe40bed7f56090b9099.tar.bz2
xen-1cbb1ec85e90017d6d89fbe40bed7f56090b9099.zip
Add ability to inspect messages from domain for arbitrary strings.
Used on PowerPC to FAIL(), if the guest domain hits a BUG() and enters XMON. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Diffstat (limited to 'tools/xm-test/lib/XmTestLib/Console.py')
-rwxr-xr-xtools/xm-test/lib/XmTestLib/Console.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/xm-test/lib/XmTestLib/Console.py b/tools/xm-test/lib/XmTestLib/Console.py
index 5507d3b1ec..b92f32bb3b 100755
--- a/tools/xm-test/lib/XmTestLib/Console.py
+++ b/tools/xm-test/lib/XmTestLib/Console.py
@@ -31,6 +31,7 @@ import termios
import fcntl
import select
+import arch
from Test import *
TIMEDOUT = 1
@@ -120,6 +121,7 @@ class XmConsole:
def __getprompt(self, fd):
timeout = 0
bytes = 0
+ buffer = ""
while timeout < 180:
# eat anything while total bytes less than limit else raise RUNAWAY
while (not self.limit) or (bytes < self.limit):
@@ -130,6 +132,7 @@ class XmConsole:
if self.debugMe:
sys.stdout.write(foo)
bytes += 1
+ buffer += foo
except Exception, exn:
raise ConsoleError(str(exn))
else:
@@ -137,6 +140,8 @@ class XmConsole:
else:
raise ConsoleError("Console run-away (exceeded %i bytes)"
% self.limit, RUNAWAY)
+ # Check to see if the buffer contains anything interetsing
+ arch.checkBuffer(buffer)
# press enter
os.write(self.consoleFd, "\n")
# look for prompt