📄 10_create_fastdestroy.py
字号:
#!/usr/bin/python# Copyright (C) International Business Machines Corp., 2005# Author: Dan Smith <danms@us.ibm.com>from XmTestLib import *import re## Check to see if the output resembles the# "No such process error"#def check_for_NSP_error(output): if re.search("XendError.*No such process", output): return "Bugzilla bug #234" else: return Nonedef check_for_DUP_error(output): if re.search("Error.*already exists\!", output): return "Xend reported duplicate domain (stale state?)" else: return Nonei = 0for i in range(0,50): domain = XmTestDomain("testdomain") try: domain.start(noConsole=True) except DomainError,e: print "Failed: " + e.extra NSPerror = check_for_NSP_error(e.extra) DUPerror = check_for_DUP_error(e.extra) if NSPerror: FAIL(NSPerror) elif DUPerror: FAIL(DUPerror) else: FAIL("xm create returned invalid status: %i" % e.errorcode) domain.destroy()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -