ia64/xen-unstable

annotate tools/xm-test/tests/create/15_create_smallmem_pos.py @ 8343:1dc393b65019

Change the way domain configuration is handled in xm-test.
This will simplify the way we differentiate between HV and PV domains,
as well as make it easier to run normal tests in either HV or PV mode.

This patch has been modified by Ewan Mellor, to match his recent changes to
remove the nics= configuration option.

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Dan Stekloff <dsteklof@us.ibm.com>
author emellor@leeni.uk.xensource.com
date Tue Dec 13 16:26:24 2005 +0000 (2005-12-13)
parents eb1169f92d81
children a22ce69dd703
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
emellor@8343 10 domain = XmTestDomain(extraConfig={"memory": MEM,
emellor@8343 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())
emellor@8088 20 console.setLimit(65536)
dan@7870 21 console.sendInput("input")
dan@7870 22 console.runCmd("ls")
dan@7870 23 except ConsoleError, e:
dan@7870 24 if e.reason == RUNAWAY:
dan@7870 25 FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM)
dan@7870 26 else:
dan@7870 27 FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM)
dan@7870 28
dan@7870 29 domain.destroy()