📄 02_memset_badparm_neg.py
字号:
#!/usr/bin/python# Copyright (C) International Business Machines Corp., 2005# Author: Woody Marvel <marvel@us.ibm.com>#### Description:## Test xm mem-set output and status## Negative Tests:## 1) Test xm mem_set (no parm)## 2) Test xm list (non existent parm)## 3) Test xm list (non existent domain)###### Author: Woody Marvel marvel@us.ibm.com##import re from XmTestLib import * if ENABLE_HVM_SUPPORT: SKIP("Mem-set not supported for HVM domains")# destroy no parm input - negative teststatus, output = traceCommand("xm mem-set")eyecatcher = "Error:"where = output.find(eyecatcher)if status == 0: FAIL("xm mem-set returned invalid %i == 0" % status)elif where == -1: FAIL("xm mem-set failed to report error for missing arg")# destroy non existent parm input - negative teststatus, output = traceCommand("xm mem-set -x")where = output.find(eyecatcher)if status == 0: FAIL("xm mem-set returned invalid %i == 0" % status)elif where == -1: FAIL("xm mem-set failed to report error for bad arg")# destroy non existent domain - negative teststatus, output = traceCommand("xm mem-set 6666")where = output.find(eyecatcher)if status == 0: FAIL("xm mem-set returned invalid %i == 0" % status)elif where == -1: FAIL("xm mem-set failed to report error for invalid domid")# destroy non existent domain and memory - negative teststatus, output = traceCommand("xm mem-set 6666 64")where = output.find(eyecatcher)if status == 0: FAIL("xm mem-set returned invalid %i == -1" % status)elif where == -1: FAIL("xm mem-set failed to report error for invalid domid")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -