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] Make test 04_memset detect bug #380 and restart the cons

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Make test 04_memset detect bug #380 and restart the console daemon.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Nov 2005 16:02:08 +0000
Delivery-date: Thu, 17 Nov 2005 16:02:19 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 dan@xxxxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 234b3d608c86496be30adcd147f9213bec8befd5
# Parent  2ce5edc0ccbd9260037bb47c4fe1780cc5d75d44
Make test 04_memset detect bug #380 and restart the console daemon.
This should allow the rest of the tests to run without reporting
failure because this test killed the console system.

diff -r 2ce5edc0ccbd -r 234b3d608c86 tools/xm-test/lib/XmTestLib/Console.py
--- a/tools/xm-test/lib/XmTestLib/Console.py    Thu Nov 17 10:54:52 2005
+++ b/tools/xm-test/lib/XmTestLib/Console.py    Thu Nov 17 10:56:13 2005
@@ -33,9 +33,13 @@
 
 from Test import *
 
+TIMEDOUT = 1
+RUNAWAY  = 2
+
 class ConsoleError(Exception):
-    def __init__(self, msg):
+    def __init__(self, msg, reason=TIMEDOUT):
         self.errMsg = msg
+        self.reason = reason
 
     def __str__(self):
         return str(self.errMsg)
@@ -149,7 +153,7 @@
 
             if self.limit and bytes >= self.limit:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"
-                                   % self.limit)
+                                   % self.limit, RUNAWAY)
 
         if self.debugMe:
             print "Ignored %i bytes of miscellaneous console output" % bytes
@@ -187,7 +191,7 @@
 
             if self.limit and bytes >= self.limit:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"
-                                   % self.limit)
+                                   % self.limit, RUNAWAY)
 
             if str == "\n":
                 if lines > 0:
diff -r 2ce5edc0ccbd -r 234b3d608c86 
tools/xm-test/tests/memset/04_memset_smallmem_pos.py
--- a/tools/xm-test/tests/memset/04_memset_smallmem_pos.py      Thu Nov 17 
10:54:52 2005
+++ b/tools/xm-test/tests/memset/04_memset_smallmem_pos.py      Thu Nov 17 
10:56:13 2005
@@ -36,6 +36,17 @@
     # See if this hits the byte limit
     console.runCmd("ls")
 except ConsoleError, e:
-    FAIL(str(e))
+    if e.reason == RUNAWAY:
+        # Need to stop the domain before we restart the console daemon
+        domain.destroy()
+        if verbose:
+            print "*** Attempting restart of xenconsoled"
+            s, o = traceCommand("killall xenconsoled")
+            s, o = traceCommand("xenconsoled")
+            if s != 0:
+                print "*** Starting xenconsoled failed: %i" % s
+        FAIL("Bug #380: I crashed the console system")
+    else:
+        FAIL(str(e))
 
 domain.destroy()

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Make test 04_memset detect bug #380 and restart the console daemon., Xen patchbot -unstable <=