06_block_attach_baddomain_neg.py
来自「xen 3.2.2 源码」· Python 代码 · 共 19 行
PY
19 行
#!/usr/bin/python# Copyright (C) International Business Machines Corp., 2005# Author: Murillo F. Bernardes <mfb@br.ibm.com>from XmTestLib import *if ENABLE_HVM_SUPPORT: SKIP("Block-attach not supported for HVM domains")status, output = traceCommand("xm block-attach NOT-EXIST phy:ram1 xvda1 w")eyecatcher = "Error"where = output.find(eyecatcher)if status == 0: FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )elif where == -1: FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?