ia64/xen-unstable

changeset 9220:e0741ec5ec52

Fix test 11_create_concurrent_ps.py for HVM domains. HVM can only
load as many disk.img domains as there are loop devices. Added a
small function to get number of loop devices to be used as a max
for number of concurrent domains the test launches.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
author stekloff@elm3b216.beaverton.ibm.com
date Fri Mar 10 10:54:25 2006 +0100 (2006-03-10)
parents 00061c916dbb
children cc303cdf8809
files tools/xm-test/lib/XmTestLib/Test.py tools/xm-test/tests/create/11_create_concurrent_pos.py
line diff
     1.1 --- a/tools/xm-test/lib/XmTestLib/Test.py	Fri Mar 10 09:12:22 2006 +0100
     1.2 +++ b/tools/xm-test/lib/XmTestLib/Test.py	Fri Mar 10 10:54:25 2006 +0100
     1.3 @@ -32,6 +32,7 @@ import pty
     1.4  import select
     1.5  import signal
     1.6  import re
     1.7 +import glob
     1.8  
     1.9  TEST_PASS = 0
    1.10  TEST_FAIL = 255
    1.11 @@ -184,7 +185,16 @@ def isConsoleDead():
    1.12      domain.destroy()
    1.13  
    1.14      return False
    1.15 -    
    1.16 +
    1.17 +#
    1.18 +# We currently can only load as many concurrent HVM domains as loop 
    1.19 +# devices, need to find how many devices the system has.
    1.20 +def getMaxHVMDomains():
    1.21 +    nodes = glob.glob("/dev/loop*")
    1.22 +    maxd = len(nodes)
    1.23 +
    1.24 +    return maxd
    1.25 +
    1.26  
    1.27  if __name__ == "__main__":
    1.28  
     2.1 --- a/tools/xm-test/tests/create/11_create_concurrent_pos.py	Fri Mar 10 09:12:22 2006 +0100
     2.2 +++ b/tools/xm-test/tests/create/11_create_concurrent_pos.py	Fri Mar 10 10:54:25 2006 +0100
     2.3 @@ -8,8 +8,14 @@ from XmTestLib import *
     2.4  import time
     2.5  import random
     2.6  
     2.7 -MIN_DOMS    = 10
     2.8 -MAX_DOMS    = 50
     2.9 +if ENABLE_HVM_SUPPORT:
    2.10 +    MAX_DOMS = getMaxHVMDomains()
    2.11 +    if MAX_DOMS > 50:
    2.12 +        MAX_DOMS = 50
    2.13 +else:
    2.14 +    MAX_DOMS = 50
    2.15 +
    2.16 +MIN_DOMS    = 5
    2.17  MEM_PER_DOM = 24
    2.18  
    2.19  domains = []