ia64/xen-unstable

annotate tools/xm-test/tests/create/15_create_smallmem_pos.py @ 7894:7209244ea3d1

Make test 15_create_smallmem pass mem=16M on the kernel command line.
author dan@guaranine.beaverton.ibm.com
date Fri Nov 18 13:02:33 2005 +0100 (2005-11-18)
parents cbf6f95e9c62
children eb1169f92d81
rev   line source
dan@7870 1 #!/usr/bin/python
dan@7870 2
dan@7870 3 # Copyright (C) International Business Machines Corp., 2005
dan@7870 4 # Author: Dan Smith <danms@us.ibm.com>
dan@7870 5
dan@7870 6 from XmTestLib import *
dan@7870 7
dan@7870 8 MEM = 16
dan@7870 9
dan@7894 10 domain = XmTestDomain(extraOpts={"memory":"%i" % MEM,
dan@7894 11 "extra" :"mem=%iM" % MEM})
dan@7870 12
dan@7870 13 try:
dan@7870 14 domain.start()
dan@7870 15 except DomainError, e:
dan@7870 16 FAIL("Unable to start a domain with %i MB" % MEM)
dan@7870 17
dan@7870 18 try:
dan@7870 19 console = XmConsole(domain.getName())
dan@7870 20 console.sendInput("input")
dan@7870 21 console.runCmd("ls")
dan@7870 22 except ConsoleError, e:
dan@7870 23 if e.reason == RUNAWAY:
dan@7870 24 FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM)
dan@7870 25 else:
dan@7870 26 FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM)
dan@7870 27
dan@7870 28 domain.destroy()