ia64/xen-unstable

view tools/xm-test/tests/create/14_create_blockroot_pos.py @ 11960:fd5140c2854f

Fix Memory assumptions in the create tests.

Use the architecture specified idea of minimum memory.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Oct 24 14:52:20 2006 +0100 (2006-10-24)
parents bef7f5fcf207
children 515332c7a901
line source
1 #!/usr/bin/python
3 # Copyright (C) International Business Machines Corp., 2005
4 # Authors: Dan Smith <danms@us.ibm.com>
6 from XmTestLib import *
8 import os
9 import time
11 rdpath = getRdPath()
13 # status, output = traceCommand("losetup -f %s" % rdpath)
14 # if status != 0:
15 # FAIL("Unable to get a free loop device")
16 #
17 # if verbose:
18 # print "Using %s" % output
20 if ENABLE_HVM_SUPPORT:
21 domain = XmTestDomain(name="14_create_blockroot")
22 else:
23 config = {"memory" : "64",
24 "root" : "/dev/hda1",
25 "name" : "14_create_blockroot",
26 "kernel" : getDefaultKernel(),
27 "disk" : "file:%s/initrd.img,hda1,w" % rdpath
28 }
29 domConfig = XenConfig()
30 domConfig.setOpts(config)
31 domain = XenDomain(name=domConfig.getOpt("name"), config=domConfig)
33 try:
34 console = domain.start()
35 except DomainError, e:
36 FAIL(str(e))
38 #waitForBoot()
40 try:
41 # console.debugMe = True
42 run = console.runCmd("ls")
44 except ConsoleError, e:
45 saveLog(console.getHistory())
46 FAIL(str(e))
48 if run["return"] != 0:
49 FAIL("DomU 'ls' failed")