Files
xen/tools/xm-test/tests/create/10_create_fastdestroy.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

44 lines
1.0 KiB
Python

#!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Dan Smith <danms@us.ibm.com>
from XmTestLib import *
import re
#
# Check to see if the output resembles the
# "No such process error"
#
def check_for_NSP_error(output):
if re.search("XendError.*No such process", output):
return "Bugzilla bug #234"
else:
return None
def check_for_DUP_error(output):
if re.search("Error.*already exists\!", output):
return "Xend reported duplicate domain (stale state?)"
else:
return None
i = 0
for i in range(0,50):
domain = XmTestDomain("testdomain")
try:
domain.start(noConsole=True)
except DomainError,e:
print "Failed: " + e.extra
NSPerror = check_for_NSP_error(e.extra)
DUPerror = check_for_DUP_error(e.extra)
if NSPerror:
FAIL(NSPerror)
elif DUPerror:
FAIL(DUPerror)
else:
FAIL("xm create returned invalid status: %i" % e.errorcode)
domain.destroy()