15_create_smallmem_pos.py
来自「xen 3.2.2 源码」· Python 代码 · 共 28 行
PY
28 行
#!/usr/bin/python# Copyright (C) International Business Machines Corp., 2005# Author: Dan Smith <danms@us.ibm.com>from XmTestLib import *# Create a domain with the minimum memory allocationMEM = minSafeMem()domain = XmTestDomain(extraConfig={"memory": MEM, "extra" :"mem=%iM" % MEM})try: console = domain.start()except DomainError, e: FAIL("Unable to start a domain with %i MB" % MEM)try: console.runCmd("ls")except ConsoleError, e: if e.reason == RUNAWAY: FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM) else: FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM)domain.destroy()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?