mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
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>
45 lines
883 B
Python
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")
|