Files
xen/tools/xm-test/tests/_sanity/01_domu_proc.py
T
emellor@leeni.uk.xensource.com 57a3f4ca82 Second step toward a new network infrastructure, move XmConsole to be
in XenDomain. The devices we will add, like network, will need to run
console commands when a domain is started. So I have made console be
a part of domain object, which it's tied to anyway.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-04 14:22:17 +01:00

33 lines
630 B
Python

#!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Dan Smith <danms@us.ibm.com>
#
# Test that the library and ramdisk are working to the point
# that we can start a DomU and read /proc
#
from XmTestLib import *
import re
domain = XmTestDomain()
try:
console = domain.start()
except DomainError, e:
FAIL(str(e))
try:
run = console.runCmd("cat /proc/cpuinfo")
except ConsoleError, e:
FAIL(str(e))
if run["return"] != 0:
FAIL("Unable to read /proc/cpuinfo")
if not re.search("processor", run["output"]):
print run["output"]
FAIL("/proc/cpuinfo looks wrong!")