[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Test for creating a domain with too little memory.



# HG changeset patch
# User dan@xxxxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID cbf6f95e9c62ab2fcb7c430a51b5444f5139945e
# Parent  28eec8977024d29f1d2ab18e0783256a753c7acc
Test for creating a domain with too little memory.

diff -r 28eec8977024 -r cbf6f95e9c62 tools/xm-test/tests/create/Makefile.am
--- a/tools/xm-test/tests/create/Makefile.am    Wed Nov 16 19:32:36 2005
+++ b/tools/xm-test/tests/create/Makefile.am    Wed Nov 16 19:33:12 2005
@@ -12,8 +12,8 @@
        11_create_concurrent_pos.test \
        12_create_concurrent_stress_pos.test \
        13_create_multinic_pos.test \
-       14_create_blockroot_pos.test
-
+       14_create_blockroot_pos.test \
+       15_create_smallmem_pos.test
 
 DISABLED_TESTS =       05_create_noroot_noram_neg.test 
 
diff -r 28eec8977024 -r cbf6f95e9c62 
tools/xm-test/tests/create/15_create_smallmem_pos.py
--- /dev/null   Wed Nov 16 19:32:36 2005
+++ b/tools/xm-test/tests/create/15_create_smallmem_pos.py      Wed Nov 16 
19:33:12 2005
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+# Copyright (C) International Business Machines Corp., 2005
+# Author: Dan Smith <danms@xxxxxxxxxx>
+
+from XmTestLib import *
+
+MEM = 16
+
+domain = XmTestDomain(extraOpts={"memory":"%i" % MEM})
+
+try:
+    domain.start()
+except DomainError, e:
+    FAIL("Unable to start a domain with %i MB" % MEM)
+
+try:
+    console = XmConsole(domain.getName())
+    console.sendInput("input")
+    console.runCmd("ls")
+except ConsoleError, e:
+    if e.reason == RUNAWAY:
+        FAIL("Bug #380: Starting a console with %i MB crashed the console 
daemon" % MEM)
+    else:
+        FAIL("Starting a console with %i MB failed: domain dies immediately!" 
% MEM)
+
+domain.destroy()

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.