01_domu_proc.py
来自「xen虚拟机源代码安装包」· Python 代码 · 共 33 行
PY
33 行
#!/usr/bin/python# Copyright (C) International Business Machines Corp., 2005# Author: Dan Smith <danms@us.ibm.com>## Test that the library and ramdisk are working to the point# that we can start a DomU and read /proc#from XmTestLib import *import redomain = XmTestDomain()try: console = domain.start()except DomainError, e: FAIL(str(e))try: run = console.runCmd("cat /proc/cpuinfo")except ConsoleError, e: FAIL(str(e))if run["return"] != 0: FAIL("Unable to read /proc/cpuinfo")if not re.search("processor", run["output"]): print run["output"] FAIL("/proc/cpuinfo looks wrong!")
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?