ia64/xen-unstable

view tools/xm-test/tests/create/16_create_smallmem_neg.py @ 9936:bef7f5fcf207

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>
author emellor@leeni.uk.xensource.com
date Thu May 04 14:22:17 2006 +0100 (2006-05-04)
parents a22ce69dd703
children c2c02e425c06
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 # This is under the default lower limit of 32 and we expect this test
9 # to fail. 16MBs isn't enough for the -xen kernel.
10 MEM = 16
12 domain = XmTestDomain(extraConfig={"memory": MEM,
13 "extra" :"mem=%iM" % MEM})
15 try:
16 console = domain.start()
17 except DomainError, e:
18 FAIL("Unable to start a domain with %i MB" % MEM)
20 try:
21 console.runCmd("ls")
22 except ConsoleError, e:
23 if e.reason == RUNAWAY:
24 print "Domain with %i MB has runaway console as expected" % MEM
25 else:
26 print "Starting a domain with %i MB failed as expected" % MEM
27 else:
28 FAIL("Starting a console with %i MB passed, expected test to fail" % MEM)
30 domain.destroy()