ia64/xen-unstable

view tools/xm-test/tests/create/16_create_smallmem_neg.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 c2c02e425c06
children
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Author: Dan Smith <danms@us.ibm.com>
6 import re
7 from XmTestLib import *
9 # This is under the default lower limit of 32 and we expect this test
10 # to fail. 16MBs isn't enough for the -xen kernel.
11 MEM = 16
13 domain = XmTestDomain(extraConfig={"memory": MEM,
14 "extra" :"mem=%iM" % MEM})
16 try:
17 console = domain.start()
18 console.runCmd("ls")
19 except DomainError, e:
20 if not re.search('^Error: Domain memory must be at least \d+ KB', e.extra):
21 # PPC gracefully fails like this, rather than crashing.
22 FAIL("Unable to start a domain with %i MB" % MEM)
23 except ConsoleError, e:
24 if e.reason == RUNAWAY:
25 print "Domain with %i MB has runaway console as expected" % MEM
26 else:
27 FAIL("Starting a console with %i MB passed, expected test to fail" % MEM)
29 print "Starting a domain with %i MB failed as expected" % MEM
30 domain.destroy()