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-devel

[Xen-devel] [PATCH][XM-TEST] Test that tries to create a 16MB domain

To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][XM-TEST] Test that tries to create a 16MB domain
From: Dan Smith <danms@xxxxxxxxxx>
Date: Wed, 16 Nov 2005 10:19:35 -0800
Delivery-date: Wed, 16 Nov 2005 18:19:39 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)
This patch adds a test that tries to create a domain with only 16MB of
RAM.  It verifies that the domain is created and that the console
works.

Right now this test fails for me: the domain just dies immediately
with no indication of why, or with any useful console data.  Should we
put a sanity check on xm's create and mem-set commands that prevent
the user from doing something we know won't work?  Perhaps we can add
a --force flag to allow overrides.

Thoughts?

Signed-off-by: Dan Smith <danms@xxxxxxxxxx>
# HG changeset patch
# User dan@xxxxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID bb952a9c3aaa8ff13677cc8d98e131d9992eac1c
# Parent  c2c033d42ffcc7061a505e0e62e9fbe0ff9ae152
Test for creating a domain with too little memory.

diff -r c2c033d42ffc -r bb952a9c3aaa tools/xm-test/tests/create/Makefile.am
--- a/tools/xm-test/tests/create/Makefile.am    Wed Nov 16 16:47:16 2005
+++ b/tools/xm-test/tests/create/Makefile.am    Wed Nov 16 16:50:04 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 c2c033d42ffc -r bb952a9c3aaa 
tools/xm-test/tests/create/15_create_smallmem_pos.py
--- /dev/null   Wed Nov 16 16:47:16 2005
+++ b/tools/xm-test/tests/create/15_create_smallmem_pos.py      Wed Nov 16 
16:50:04 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()
-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@xxxxxxxxxx
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel