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] Fix Memory assumptions in the create test

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix Memory assumptions in the create tests.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Oct 2006 16:30:16 +0000
Delivery-date: Tue, 24 Oct 2006 09:30:18 -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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID fd5140c2854fe99e1181546383b40de6210f41ee
# Parent  55ff34dceb0bfba8bcc648dd30a2b97d85f24b3c
Fix Memory assumptions in the create tests.

Use the architecture specified idea of minimum memory.

Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
---
 tools/xm-test/tests/create/11_create_concurrent_pos.py        |    2 +-
 tools/xm-test/tests/create/12_create_concurrent_stress_pos.py |    9 ++++++++-
 tools/xm-test/tests/create/15_create_smallmem_pos.py          |    4 ++--
 tools/xm-test/tests/create/16_create_smallmem_neg.py          |    8 +++++---
 4 files changed, 16 insertions(+), 7 deletions(-)

diff -r 55ff34dceb0b -r fd5140c2854f 
tools/xm-test/tests/create/11_create_concurrent_pos.py
--- a/tools/xm-test/tests/create/11_create_concurrent_pos.py    Tue Oct 24 
14:48:06 2006 +0100
+++ b/tools/xm-test/tests/create/11_create_concurrent_pos.py    Tue Oct 24 
14:52:20 2006 +0100
@@ -16,7 +16,7 @@ else:
     MAX_DOMS = 50
 
 MIN_DOMS    = 5
-MEM_PER_DOM = 24
+MEM_PER_DOM = minSafeMem()
 
 domains = []
 console = []
diff -r 55ff34dceb0b -r fd5140c2854f 
tools/xm-test/tests/create/12_create_concurrent_stress_pos.py
--- a/tools/xm-test/tests/create/12_create_concurrent_stress_pos.py     Tue Oct 
24 14:48:06 2006 +0100
+++ b/tools/xm-test/tests/create/12_create_concurrent_stress_pos.py     Tue Oct 
24 14:52:20 2006 +0100
@@ -8,10 +8,17 @@ import time
 import time
 
 DOMS=5
-MEM=32
+MEM=minSafeMem()
 DUR=60
 
 domains = []
+
+free_mem = int(getInfo("free_memory"))
+NUM_DOMS = int(free_mem / MEM)
+
+if NUM_DOMS < DOMS:
+    SKIP("Need %i MB of RAM to start %i@%iMB domains! (%i MB avail)" %
+         (DOMS * MEM, DOMS, MEM, free_mem))
 
 for i in range(0,DOMS):
     dom = XmTestDomain(extraConfig={"memory" : MEM})
diff -r 55ff34dceb0b -r fd5140c2854f 
tools/xm-test/tests/create/15_create_smallmem_pos.py
--- a/tools/xm-test/tests/create/15_create_smallmem_pos.py      Tue Oct 24 
14:48:06 2006 +0100
+++ b/tools/xm-test/tests/create/15_create_smallmem_pos.py      Tue Oct 24 
14:52:20 2006 +0100
@@ -5,8 +5,8 @@
 
 from XmTestLib import *
 
-# 32MBs is the default lower limit for creating domains, it should work
-MEM = 32
+# Create a domain with the minimum memory allocation
+MEM = minSafeMem()
 
 domain = XmTestDomain(extraConfig={"memory": MEM,
                                    "extra" :"mem=%iM" % MEM})
diff -r 55ff34dceb0b -r fd5140c2854f 
tools/xm-test/tests/create/16_create_smallmem_neg.py
--- a/tools/xm-test/tests/create/16_create_smallmem_neg.py      Tue Oct 24 
14:48:06 2006 +0100
+++ b/tools/xm-test/tests/create/16_create_smallmem_neg.py      Tue Oct 24 
14:52:20 2006 +0100
@@ -3,6 +3,7 @@
 # Copyright (C) International Business Machines Corp., 2005
 # Author: Dan Smith <danms@xxxxxxxxxx>
 
+import re
 from XmTestLib import *
 
 # This is under the default lower limit of 32 and we expect this test
@@ -16,13 +17,14 @@ try:
     console = domain.start()
     console.runCmd("ls")
 except DomainError, e:
-    FAIL("Unable to start a domain with %i MB" % MEM)
+    if not re.search('^Error: Domain memory must be at least \d+ KB', e.extra):
+        # PPC gracefully fails like this, rather than crashing.
+        FAIL("Unable to start a domain with %i MB" % MEM)
 except ConsoleError, e:
     if e.reason == RUNAWAY:
         print "Domain with %i MB has runaway console as expected" % MEM
-    else:
-        print "Starting a domain with %i MB failed as expected" % MEM
 else:
     FAIL("Starting a console with %i MB passed, expected test to fail" % MEM)
 
+print "Starting a domain with %i MB failed as expected" % MEM
 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] [xen-unstable] Fix Memory assumptions in the create tests., Xen patchbot-unstable <=