ia64/xen-unstable

view tools/xm-test/tests/create/06_create_mem_neg.py @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 7869f58ff551
children
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Author: Li Ge <lge@us.ibm.com>
6 # Test Description:
7 # Negative Tests:
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
11 import sys
12 import re
13 import time
15 from XmTestLib import *
17 rdpath = os.environ.get("RD_PATH")
18 if not rdpath:
19 rdpath = "../ramdisk"
21 # Test 1: create a domain with mem=0
22 config1 = {"memory": 0}
23 domain1=XmTestDomain(extraConfig=config1)
25 try:
26 domain1.start(noConsole=True)
27 eyecatcher1 = "Created"
28 except DomainError, e:
29 eyecatcher1 = "Fail"
31 if eyecatcher1 != "Fail":
32 domain1.stop()
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)
44 try:
45 domain2.start(noConsole=True)
46 eyecatcher2 = "Created"
47 except DomainError, e:
48 eyecatcher2 = "Fail"
50 if eyecatcher2 != "Fail":
51 domain2.stop()
52 FAIL("xm create let me create a domain with mem > sys_mem")