Files
xen/tools/xm-test/tests/create/14_create_blockroot_pos.py
T
Ewan Mellor 240c6346f7 The XenDomain class does not respect the arch defaults where
as XmTestDomain does.  This part of the patch forces both HVM and
non-HVM tests to use XmTestDomain.  With appropriate changes to the
extraConfig arg.

On PPC we need to use the arch defaults to get the console setup
correctly.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2006-11-01 08:38:22 +00:00

45 lines
883 B
Python

#!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Authors: Dan Smith <danms@us.ibm.com>
from XmTestLib import *
import os
import time
rdpath = getRdPath()
# status, output = traceCommand("losetup -f %s" % rdpath)
# if status != 0:
# FAIL("Unable to get a free loop device")
#
# if verbose:
# print "Using %s" % output
if ENABLE_HVM_SUPPORT:
config = None
else:
config = {"root" : "/dev/hda1",
"disk" : "file:%s/initrd.img,hda1,w" % rdpath
}
domain = XmTestDomain(name="14_create_blockroot", extraConfig=config)
try:
console = domain.start()
except DomainError, e:
FAIL(str(e))
#waitForBoot()
try:
# console.debugMe = True
run = console.runCmd("ls")
except ConsoleError, e:
saveLog(console.getHistory())
FAIL(str(e))
if run["return"] != 0:
FAIL("DomU 'ls' failed")