ia64/xen-unstable

view tools/xm-test/tests/create/10_create_fastdestroy.py @ 11960:fd5140c2854f

Fix Memory assumptions in the create tests.

Use the architecture specified idea of minimum memory.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Oct 24 14:52:20 2006 +0100 (2006-10-24)
parents bef7f5fcf207
children
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Author: Dan Smith <danms@us.ibm.com>
6 from XmTestLib import *
8 import re
10 #
11 # Check to see if the output resembles the
12 # "No such process error"
13 #
14 def check_for_NSP_error(output):
15 if re.search("XendError.*No such process", output):
16 return "Bugzilla bug #234"
17 else:
18 return None
20 def check_for_DUP_error(output):
21 if re.search("Error.*already exists\!", output):
22 return "Xend reported duplicate domain (stale state?)"
23 else:
24 return None
26 i = 0
28 for i in range(0,50):
29 domain = XmTestDomain("testdomain")
30 try:
31 domain.start(noConsole=True)
32 except DomainError,e:
33 print "Failed: " + e.extra
34 NSPerror = check_for_NSP_error(e.extra)
35 DUPerror = check_for_DUP_error(e.extra)
36 if NSPerror:
37 FAIL(NSPerror)
38 elif DUPerror:
39 FAIL(DUPerror)
40 else:
41 FAIL("xm create returned invalid status: %i" % e.errorcode)
42 domain.destroy()