~ressu/+junk/xen-ubuntu

« back to all changes in this revision

Viewing changes to tools/xm-test/tests/create/15_create_smallmem_pos.py

  • Committer: sami at haahtinen
  • Author(s): Bastian Blank
  • Date: 2010-09-03 15:14:28 UTC
  • Revision ID: sami@haahtinen.name-20100903151428-f88eg54n2fdnak41
Tags: upstream-4.0.1
ImportĀ upstreamĀ versionĀ 4.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
# Copyright (C) International Business Machines Corp., 2005
 
4
# Author: Dan Smith <danms@us.ibm.com>
 
5
 
 
6
from XmTestLib import *
 
7
 
 
8
# Create a domain with the minimum memory allocation
 
9
MEM = minSafeMem()
 
10
 
 
11
domain = XmTestDomain(extraConfig={"memory": MEM,
 
12
                                   "extra" :"mem=%iM" % MEM})
 
13
 
 
14
try:
 
15
    console = domain.start()
 
16
except DomainError, e:
 
17
    FAIL("Unable to start a domain with %i MB" % MEM)
 
18
 
 
19
try:
 
20
    console.runCmd("ls")
 
21
except ConsoleError, e:
 
22
    if e.reason == RUNAWAY:
 
23
        FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM)
 
24
    else:
 
25
        FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM)
 
26
 
 
27
domain.destroy()