From: Dan Smith Subject: [PATCH][XM-TEST] Test that tries to create a 16MB domain Date: Wed, 16 Nov 2005 10:19:35 -0800 Message-ID: <87r79gcv60.fsf@theine.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Developers List-Id: xen-devel@lists.xenproject.org --=-=-= 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=15_create_smallmem.patch # HG changeset patch # User dan@guaranine.beaverton.ibm.com # 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 + +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@us.ibm.com --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-=-=--