ia64/xen-unstable

view tools/xm-test/tests/create/07_create_mem64_pos.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 # Positive Test
8 # Test for creating domain with mem=64.
10 import sys
11 import re
12 import time
14 from XmTestLib import *
16 rdpath = os.environ.get("RD_PATH")
17 if not rdpath:
18 rdpath = "../ramdisk"
20 #get current free memory info
21 mem = int(getInfo("free_memory"))
22 if mem < 64:
23 SKIP("This test needs 64 MB of free memory (%i MB avail)" % mem)
25 #create a domain with mem=64
26 config = {"memory": 64}
27 domain_mem64=XmTestDomain(extraConfig=config)
29 #start it
30 try:
31 domain_mem64.start(noConsole=True)
32 except DomainError, e:
33 if verbose:
34 print "Failed to create test domain_mem64 because:"
35 print e.extra
36 FAIL(str(e))
38 #verify it is running with 64MB mem
40 eyecatcher1 = str(isDomainRunning(domain_mem64.getName()))
41 if eyecatcher1 != "True":
42 FAIL("Failed to verify that a 64MB domain started")
44 eyecatcher2 = getDomMem(domain_mem64.getName())
45 if eyecatcher2 not in range(62, 65):
46 FAIL("Started domain with 64MB, but it got %i MB" % eyecatcher2)
48 #stop the domain (nice shutdown)
49 domain_mem64.stop()