direct-io.hg

changeset 7979:4b8599f53bb4

Make 04_memset_smallmem differentiate between console run-away and console
daemon death.
author dan@guaranine.beaverton.ibm.com
date Wed Nov 23 12:31:30 2005 +0100 (2005-11-23)
parents 6ab21a197549
children 092ac41ec8bd
files tools/xm-test/lib/XmTestLib/Test.py tools/xm-test/tests/memset/04_memset_smallmem_pos.py
line diff
     1.1 --- a/tools/xm-test/lib/XmTestLib/Test.py	Wed Nov 23 12:29:58 2005 +0100
     1.2 +++ b/tools/xm-test/lib/XmTestLib/Test.py	Wed Nov 23 12:31:30 2005 +0100
     1.3 @@ -161,6 +161,29 @@ def timeStamp():
     1.4      print "*** Test %s started at %s %s" % (name, t,
     1.5                                              time.tzname[time.daylight])
     1.6  
     1.7 +#
     1.8 +# Try to start a domain and attach a console to it to see if
     1.9 +# the console system is working
    1.10 +#
    1.11 +def isConsoleDead():
    1.12 +
    1.13 +    from XmTestLib import XmTestDomain, DomainError, XmConsole, ConsoleError
    1.14 +
    1.15 +    domain = XmTestDomain()
    1.16 +
    1.17 +    try:
    1.18 +        domain.start()
    1.19 +        console = XmConsole(domain.getName())
    1.20 +    except DomainError, e:
    1.21 +        return True
    1.22 +    except ConsoleError, e:
    1.23 +        return True
    1.24 +
    1.25 +    domain.destroy()
    1.26 +
    1.27 +    return False
    1.28 +    
    1.29 +
    1.30  if __name__ == "__main__":
    1.31  
    1.32      timeStamp()
     2.1 --- a/tools/xm-test/tests/memset/04_memset_smallmem_pos.py	Wed Nov 23 12:29:58 2005 +0100
     2.2 +++ b/tools/xm-test/tests/memset/04_memset_smallmem_pos.py	Wed Nov 23 12:31:30 2005 +0100
     2.3 @@ -30,7 +30,7 @@ if status != 0:
     2.4      FAIL("xm mem-set %s %i returned invalid %i != 0" %
     2.5           (domain.getName(), domain.minSafeMem(), status))
     2.6  
     2.7 -console.setLimit(8192)
     2.8 +console.setLimit(65536)
     2.9  
    2.10  try:
    2.11      # See if this hits the byte limit
    2.12 @@ -39,13 +39,15 @@ except ConsoleError, e:
    2.13      if e.reason == RUNAWAY:
    2.14          # Need to stop the domain before we restart the console daemon
    2.15          domain.destroy()
    2.16 -        if verbose:
    2.17 +        if isConsoleDead():
    2.18              print "*** Attempting restart of xenconsoled"
    2.19              s, o = traceCommand("killall xenconsoled")
    2.20              s, o = traceCommand("xenconsoled")
    2.21              if s != 0:
    2.22                  print "*** Starting xenconsoled failed: %i" % s
    2.23 -        FAIL("Bug #380: I crashed the console system")
    2.24 +            FAIL("Bug #380: I crashed the console system")
    2.25 +        else:
    2.26 +            FAIL("Bug #145: Ballooning DomU too low caused run-away")
    2.27      else:
    2.28          FAIL(str(e))
    2.29