3
# Copyright (C) International Business Machines Corp., 2005
4
# Author: Li Ge <lge@us.ibm.com>
8
# Test 1: Test for creating domain with mem=0. Verify fail
9
# Test 2: Test for creating domain with mem>sys_mem. Verify fail
15
from XmTestLib import *
17
rdpath = os.environ.get("RD_PATH")
21
# Test 1: create a domain with mem=0
22
config1 = {"memory": 0}
23
domain1=XmTestDomain(extraConfig=config1)
26
domain1.start(noConsole=True)
27
eyecatcher1 = "Created"
28
except DomainError, e:
31
if eyecatcher1 != "Fail":
33
FAIL("xm create let me create a domain with 0 memory")
36
# Test 2: create a domain with mem>sys_mem
38
mem = int(getInfo("total_memory"))
39
extreme_mem = mem + 100
41
config2 = {"memory": extreme_mem}
42
domain2=XmTestDomain(extraConfig=config2)
45
domain2.start(noConsole=True)
46
eyecatcher2 = "Created"
47
except DomainError, e:
50
if eyecatcher2 != "Fail":
52
FAIL("xm create let me create a domain with mem > sys_mem")