WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XM-TEST] Add test for new network functi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XM-TEST] Add test for new network functions
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Apr 2007 13:40:12 -0700
Delivery-date: Thu, 26 Apr 2007 13:39:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tom Wilkie <tom.wilkie@xxxxxxxxx>
# Date 1177600508 -3600
# Node ID ac203df11e5001097a2b20de188395acf1b0acc8
# Parent  aeb1931eab365fa91881d3a0c4d6be22571e98fd
[XM-TEST] Add test for new network functions

signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/xm-test/tests/xapi/03_xapi-network_pos.py |   71 ++++++++++++++++++++++++
 tools/xm-test/tests/xapi/Makefile.am            |    3 -
 2 files changed, 73 insertions(+), 1 deletion(-)

diff -r aeb1931eab36 -r ac203df11e50 
tools/xm-test/tests/xapi/03_xapi-network_pos.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/xm-test/tests/xapi/03_xapi-network_pos.py   Thu Apr 26 16:15:08 
2007 +0100
@@ -0,0 +1,71 @@
+#!/usr/bin/python
+
+# Try and create two VMs and a private network betwene the two
+
+import sys
+
+from XmTestLib import *
+from XmTestLib.network_utils import *
+
+# Create two domains (default XmTestDomain, with our ramdisk)
+try:
+    domain1 = XmTestDomain()
+    console1 = domain1.start()
+    domain2 = XmTestDomain()
+    console2 = domain2.start()
+except DomainError, e:
+    if verbose:
+        print "Failed to create test domain because:"
+        print e.extra
+    FAIL(str(e))
+
+# Create a network
+
+status, ouptut = traceCommand("xm network-new xapi-network")
+if status:
+    FAIL(output)
+
+# Attach two domains to it
+status, msg = network_attach(domain1.getName(),
+                             console1, bridge='xapi-network')
+if status:
+    FAIL(msg)
+
+status, msg = network_attach(domain2.getName(),
+                             console2, bridge='xapi-network')
+if status:
+    FAIL(msg)
+
+# Configure IP addresses on two domains
+try:
+    # Run 'ls'
+    run = console1.runCmd("ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up")
+    run = console2.runCmd("ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up")
+except ConsoleError, e:
+    saveLog(console.getHistory())
+    FAIL(str(e))
+
+# Now ping...
+try:
+    run = console1.runCmd("ping -c 4 192.168.0.2")
+    if run['return'] > 0:
+        FAIL("Could not ping other host")
+    run = console2.runCmd("ping -c 4 192.168.0.1")
+    if run['return'] > 0:
+        FAIL("Could not pint other host")
+except ConsoleError, e:
+    saveLog(console.getHistory())
+    FAIL(str(e))
+
+status, msg = network_detach(domain1.getName(), console1)
+status, msg = network_detach(domain2.getName(), console2)
+
+# Clean up
+domain1.closeConsole()
+domain1.stop()
+domain2.closeConsole()
+domain2.stop()
+
+status, ouptut = traceCommand("xm network-del xapi-network")
+if status:
+    FAIL(output)
diff -r aeb1931eab36 -r ac203df11e50 tools/xm-test/tests/xapi/Makefile.am
--- a/tools/xm-test/tests/xapi/Makefile.am      Thu Apr 26 15:48:09 2007 +0100
+++ b/tools/xm-test/tests/xapi/Makefile.am      Thu Apr 26 16:15:08 2007 +0100
@@ -1,7 +1,8 @@ SUBDIRS =
 SUBDIRS =
 
 TESTS = 01_xapi-vm_basic.test \
-       02_xapi-vbd_basic.test
+       02_xapi-vbd_basic.test \
+       03_xapi-network_pos.test
 
 XFAIL_TESTS =
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XM-TEST] Add test for new network functions, Xen patchbot-unstable <=