Skip to contentSkip to conversation

Fix test 04_memset_smallmem

PATCH Applied Dan Smith 2 participants 2 messages Nov 22, 2005 – Nov 23, 2005

lore
Share & tools
lore

Dan Smith

author
#0 lore raw

PATCH 1/1 Fix test 04_memset_smallmem

This patch fixes test 04_memset_smallmem so that it correctly differentiates between a simple console run-away and the actual console daemon dying because of the run-away. Also bump the console run-away limit to 64k.

# HG changeset patch
# User [email protected]
# Node ID 0183df7ad09e6e400499d91b3c667b84f16df83f
# Parent 13b2e5c945956657aa330a6182f204c46ba626af
Make 04_memset_smallmem differentiate between console run-away and console daemon death.

tools/xm-test/lib/XmTestLib/Test.py +23 -0
diff -r 13b2e5c94595 -r 0183df7ad09e tools/xm-test/lib/XmTestLib/Test.py
@@ -161,6 +161,29 @@
     print "*** Test %s started at %s %s" % (name, t,
                                             time.tzname[time.daylight])
 
+#
+# Try to start a domain and attach a console to it to see if
+# the console system is working
+#
+def isConsoleDead():
+
+    from XmTestLib import XmTestDomain, DomainError, XmConsole, ConsoleError
+
+    domain = XmTestDomain()
+
+    try:
+        domain.start()
+        console = XmConsole(domain.getName())
+    except DomainError, e:
+        return True
+    except ConsoleError, e:
+        return True
+
+    domain.destroy()
+
+    return False
+    
+
 if __name__ == "__main__":
 
     timeStamp()
tools/xm-test/tests/memset/04_memset_smallmem_pos.py +5 -3
diff -r 13b2e5c94595 -r 0183df7ad09e tools/xm-test/tests/memset/04_memset_smallmem_pos.py
@@ -30,7 +30,7 @@
     FAIL("xm mem-set %s %i returned invalid %i != 0" %
          (domain.getName(), domain.minSafeMem(), status))
 
-console.setLimit(8192)
+console.setLimit(65536)
 
 try:
     # See if this hits the byte limit
@@ -39,13 +39,15 @@
     if e.reason == RUNAWAY:
         # Need to stop the domain before we restart the console daemon
         domain.destroy()
-        if verbose:
+        if isConsoleDead():
             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")
+            FAIL("Bug #380: I crashed the console system")
+        else:
+            FAIL("Bug #145: Ballooning DomU too low caused run-away")
     else:
         FAIL(str(e))
 
Signature · 5 lines
-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: [email protected]

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

Applied
#1 lore raw
Quoted 6 lines · Dan Smith

This patch fixes test 04_memset_smallmem so that it correctly differentiates between a simple console run-away and the actual console daemon dying because of the run-away. Also bump the console run-away limit to 64k.

Applied.

Ewan.