14_create_blockroot_pos.py
来自「xen 3.2.2 源码」· Python 代码 · 共 45 行
PY
45 行
#!/usr/bin/python# Copyright (C) International Business Machines Corp., 2005# Authors: Dan Smith <danms@us.ibm.com>from XmTestLib import *import osimport timerdpath = getRdPath()# status, output = traceCommand("losetup -f %s" % rdpath)# if status != 0:# FAIL("Unable to get a free loop device")# # if verbose:# print "Using %s" % outputif ENABLE_HVM_SUPPORT: config = Noneelse: 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")
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?