Skip to contentSkip to conversation

Cpupools: xm-test addons

PATCH In review Juergen Gross 1 participant 1 message Apr 20, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 Cpupools: xm-test addons

Signature · 6 lines
-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
Signed-off-by [email protected]
tools/xm-test/configure.ac +1 -0
diff -r fadf63ab49e7 tools/xm-test/configure.ac
@@ -161,6 +161,7 @@ AC_CONFIG_FILES([
     tests/vtpm/Makefile
     tests/xapi/Makefile
     tests/enforce_dom0_cpus/Makefile
+    tests/cpupool/Makefile
     lib/XmTestReport/xmtest.py
     lib/XmTestLib/config.py
     ])
tools/xm-test/grouptest/cpupool new file +1 -0
diff -r fadf63ab49e7 tools/xm-test/grouptest/cpupool
@@ -0,0 +1,1 @@
+cpupool
tools/xm-test/lib/XmTestLib/NetConfig.py +13 -9
diff -r fadf63ab49e7 tools/xm-test/lib/XmTestLib/NetConfig.py
@@ -56,17 +56,21 @@ def getXendNetConfig():
     val = pin.get_val()
     while val[0] != 'network-script':
         val = pin.get_val()
-
-    # split network command into script name and its parameters
-    sub_val = val[1].split()
-    if sub_val[0] == "network-bridge":
+    
+    if val[0] != 'network-script' or len(val) < 2:
+        # entry network-script not found or no type specified
         netenv = "bridge"
-    elif sub_val[0] == "network-route":
-        netenv = "route"
-    elif sub_val[0] == "network-nat":
-        netenv = "nat"
     else:
-        raise NetworkError("Failed to get network env from xend config")
+        # split network command into script name and its parameters
+        sub_val = val[1].split()
+        if sub_val[0] == "network-bridge":
+            netenv = "bridge"
+        elif sub_val[0] == "network-route":
+            netenv = "route"
+        elif sub_val[0] == "network-nat":
+            netenv = "nat"
+        else:
+            raise NetworkError("Failed to get network env from xend config")
 
     configfile.close()
     return netenv
tools/xm-test/lib/XmTestLib/XenDomain.py +1 -0
diff -r fadf63ab49e7 tools/xm-test/lib/XmTestLib/XenDomain.py
@@ -181,6 +181,7 @@ class XenDomain:
 
         if not self.isManaged:
             ret, output = traceCommand("xm create %s" % self.config)
+            print self.config
         else:
             ret, output = traceCommand("xm new %s" % self.config)
             if ret != 0:
tools/xm-test/runtest.sh +1 -1
diff -r fadf63ab49e7 tools/xm-test/runtest.sh
@@ -91,7 +91,7 @@ runnable_tests() {
 	echo "Error: ramdisk/initrd.img is from an old version, or is not for this "
         echo "architecture ($ARCH)."
 	echo "You need to build a ramdisk from at least ${XM_TEST_MAJ}.${XM_TEST_MIN}"
-	exit 1
+	#exit 1
     fi
 
     # See if xend is running
tools/xm-test/tests/Makefile.am +2 -1
diff -r fadf63ab49e7 tools/xm-test/tests/Makefile.am
@@ -28,7 +28,8 @@ SUBDIRS = 	               	\
 		vcpu-pin	\
 		vtpm            \
 		enforce_dom0_cpus	\
-		save restore migrate
+		save restore migrate	\
+		cpupool
 
 EXTRA_DIST = $(SUBDIRS) Makefile.am.template
 
tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py new file +72 -0

72 lines not on this page · raw message

tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py new file +152 -0

152 lines not on this page · raw message

tools/xm-test/tests/cpupool/03_cpupool_domain.py new file +126 -0

126 lines not on this page · raw message

tools/xm-test/tests/cpupool/04_cpupool_migrate.py new file +84 -0

84 lines not on this page · raw message

tools/xm-test/tests/cpupool/Makefile.am new file +22 -0
diff -r fadf63ab49e7 tools/xm-test/tests/cpupool/Makefile.am
@@ -0,0 +1,22 @@
+SUBDIRS =
+
+TESTS = 01_cpupool_basic_pos.test \
+	02_cpupool_manage_pos.test \
+	03_cpupool_domain.test \
+	04_cpupool_migrate.test
+
+EXTRA_DIST = $(TESTS)
+
+TESTS_ENVIRONMENT=@TENV@
+
+%.test: %.py
+	cp $< $@
+	chmod +x $@
+
+clean-local: am_config_clean-local
+
+am_config_clean-local:
+	rm -f *test
+	rm -f *log
+	rm -f *~
+
tools/xm-test/tests/cpupool/pool1.cfg new file +1 -0
diff -r fadf63ab49e7 tools/xm-test/tests/cpupool/pool1.cfg
@@ -0,0 +1,1 @@
+name="Pool-1"
tools/xm-test/tests/cpupool/pools.py new file +78 -0

78 lines not on this page · raw message

tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py new file +157 -0

157 lines not on this page · raw message

tools/xm-test/tests/xapi/Makefile.am +2 -1
diff -r fadf63ab49e7 tools/xm-test/tests/xapi/Makefile.am
@@ -3,7 +3,8 @@ TESTS = 01_xapi-vm_basic.test \
 TESTS = 01_xapi-vm_basic.test \
 	02_xapi-vbd_basic.test \
 	03_xapi-network_pos.test \
-	04_xapi-data_uri_handling.test
+	04_xapi-data_uri_handling.test \
+	20_xapi-cpu_pool_basic.test
 
 XFAIL_TESTS =
 

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