Skip to contentSkip to conversation

Fix test 11_create_concurrent_pos.py for HVM - Bug 562

PATCH Applied Daniel Stekloff 2 participants 2 messages Mar 10, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix test 11_create_concurrent_pos.py for HVM - Bug 562

Hi,

This patch fixes test 11_create_concurrent_pos.py for HVM. It finds out the number of possible loop devices configured on the system and uses that as a max number of HVM domains that can be started concurrently.

This is a partial fix for Bug 562.

Thanks,

Dan

# HG changeset patch
# User [email protected] # Node ID 4f5961d0f3236e9ee983e99bc9f287acaeba8de7 # Parent 3ea1c6118fc27e8383ed3169ab6009026505b168

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.

tools/xm-test/lib/XmTestLib/Test.py +11 -1
diff -r 3ea1c6118fc2 -r 4f5961d0f323 tools/xm-test/lib/XmTestLib/Test.py
@@ -32,6 +32,7 @@
 import select
 import signal
 import re
+import glob
 
 TEST_PASS = 0
 TEST_FAIL = 255
@@ -184,7 +185,16 @@
     domain.destroy()
 
     return False
-    
+
+#
+# We currently can only load as many concurrent HVM domains as loop 
+# devices, need to find how many devices the system has.
+def getMaxHVMDomains():
+    nodes = glob.glob("/dev/loop*")
+    maxd = len(nodes)
+
+    return maxd
+
 
 if __name__ == "__main__":
 
tools/xm-test/tests/create/11_create_concurrent_pos.py +8 -2
diff -r 3ea1c6118fc2 -r 4f5961d0f323 tools/xm-test/tests/create/11_create_concurrent_pos.py
@@ -8,8 +8,14 @@
 import time
 import random
 
-MIN_DOMS    = 10
-MAX_DOMS    = 50
+if ENABLE_HVM_SUPPORT:
+    MAX_DOMS = getMaxHVMDomains()
+    if MAX_DOMS > 50:
+        MAX_DOMS = 50
+else:
+    MAX_DOMS = 50
+
+MIN_DOMS    = 5
 MEM_PER_DOM = 24
 
 domains = []

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw
Quoted 8 lines · Daniel Stekloff

Hi,

This patch fixes test 11_create_concurrent_pos.py for HVM. It finds out the number of possible loop devices configured on the system and uses that as a max number of HVM domains that can be started concurrently.

This is a partial fix for Bug 562.

Applied, thanks.

Ewan.