ia64/xen-unstable

view tools/xm-test/tests/create/12_create_concurrent_stress_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 fd5140c2854f
children
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Authors: Dan Smith <danms@us.ibm.com>
6 from XmTestLib import *
8 import time
10 DOMS=5
11 MEM=minSafeMem()
12 DUR=60
14 domains = []
16 free_mem = int(getInfo("free_memory"))
17 NUM_DOMS = int(free_mem / MEM)
19 if NUM_DOMS < DOMS:
20 SKIP("Need %i MB of RAM to start %i@%iMB domains! (%i MB avail)" %
21 (DOMS * MEM, DOMS, MEM, free_mem))
23 for i in range(0,DOMS):
24 dom = XmTestDomain(extraConfig={"memory" : MEM})
26 try:
27 cons = dom.start()
28 except DomainError, e:
29 if verbose:
30 print str(e)
31 FAIL("Failed to start %s" % dom.getName())
33 if verbose:
34 print "[%i/%i] Started %s" % (i, DOMS, dom.getName())
36 domains.append([dom, cons])
38 # Started DOMS domains, now we put them to work
40 for d, c in domains:
41 if verbose:
42 print "Starting task on %s" % d.getName()
43 c.sendInput("gzip -c </dev/zero >/dev/null &\n")
45 if verbose:
46 print "Waiting %i seconds..." % DUR
48 time.sleep(DUR)
50 for d, c in domains:
52 if verbose:
53 print "Testing domain %s..." % d.getName()
55 run = c.runCmd("ls")
57 if run["return"] != 0:
58 FAIL("Domain %s didn't survive!" % d.getName())