ia64/xen-unstable
annotate tools/xm-test/tests/create/15_create_smallmem_pos.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>
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 |
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 |
ewan@11960 | 8 # Create a domain with the minimum memory allocation |
ewan@11960 | 9 MEM = minSafeMem() |
dan@7870 | 10 |
emellor@8343 | 11 domain = XmTestDomain(extraConfig={"memory": MEM, |
emellor@8343 | 12 "extra" :"mem=%iM" % MEM}) |
dan@7870 | 13 |
dan@7870 | 14 try: |
emellor@9936 | 15 console = domain.start() |
dan@7870 | 16 except DomainError, e: |
dan@7870 | 17 FAIL("Unable to start a domain with %i MB" % MEM) |
dan@7870 | 18 |
dan@7870 | 19 try: |
dan@7870 | 20 console.runCmd("ls") |
dan@7870 | 21 except ConsoleError, e: |
dan@7870 | 22 if e.reason == RUNAWAY: |
dan@7870 | 23 FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM) |
dan@7870 | 24 else: |
dan@7870 | 25 FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM) |
dan@7870 | 26 |
dan@7870 | 27 domain.destroy() |