ia64/xen-unstable

changeset 7870:cbf6f95e9c62

Test for creating a domain with too little memory.
author dan@guaranine.beaverton.ibm.com
date Wed Nov 16 20:33:12 2005 +0100 (2005-11-16)
parents 28eec8977024
children 3f39f030fa89
files tools/xm-test/tests/create/15_create_smallmem_pos.py tools/xm-test/tests/create/Makefile.am
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/xm-test/tests/create/15_create_smallmem_pos.py	Wed Nov 16 20:33:12 2005 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +#!/usr/bin/python
     1.5 +
     1.6 +# Copyright (C) International Business Machines Corp., 2005
     1.7 +# Author: Dan Smith <danms@us.ibm.com>
     1.8 +
     1.9 +from XmTestLib import *
    1.10 +
    1.11 +MEM = 16
    1.12 +
    1.13 +domain = XmTestDomain(extraOpts={"memory":"%i" % MEM})
    1.14 +
    1.15 +try:
    1.16 +    domain.start()
    1.17 +except DomainError, e:
    1.18 +    FAIL("Unable to start a domain with %i MB" % MEM)
    1.19 +
    1.20 +try:
    1.21 +    console = XmConsole(domain.getName())
    1.22 +    console.sendInput("input")
    1.23 +    console.runCmd("ls")
    1.24 +except ConsoleError, e:
    1.25 +    if e.reason == RUNAWAY:
    1.26 +        FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM)
    1.27 +    else:
    1.28 +        FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM)
    1.29 +
    1.30 +domain.destroy()
     2.1 --- a/tools/xm-test/tests/create/Makefile.am	Wed Nov 16 20:32:36 2005 +0100
     2.2 +++ b/tools/xm-test/tests/create/Makefile.am	Wed Nov 16 20:33:12 2005 +0100
     2.3 @@ -12,8 +12,8 @@ TESTS = 01_create_basic_pos.test \
     2.4  	11_create_concurrent_pos.test \
     2.5  	12_create_concurrent_stress_pos.test \
     2.6  	13_create_multinic_pos.test \
     2.7 -	14_create_blockroot_pos.test
     2.8 -
     2.9 +	14_create_blockroot_pos.test \
    2.10 +	15_create_smallmem_pos.test
    2.11  
    2.12  DISABLED_TESTS = 	05_create_noroot_noram_neg.test 
    2.13