mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
33 lines
630 B
Python
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!")
|