Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
c0fc8516
T
tp-qemu
项目概览
openeuler
/
tp-qemu
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c0fc8516
编写于
1月 31, 2014
作者:
L
Lucas Meneghel Rodrigues
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7 from spcui/enforce_quit_fix
qemu.tests.enforce_quit: Update some config for different qemu-kvm version
上级
d6e89d5e
50016afd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
7 deletion
+17
-7
qemu/tests/cfg/enforce_quit.cfg
qemu/tests/cfg/enforce_quit.cfg
+6
-0
qemu/tests/enforce_quit.py
qemu/tests/enforce_quit.py
+11
-7
未找到文件。
qemu/tests/cfg/enforce_quit.cfg
浏览文件 @
c0fc8516
...
...
@@ -3,6 +3,12 @@
start_vm = "no"
no Host_RHEL.5
cpu_model_flags = ",enforce"
Host_RHEL.6:
msg_unavailable = "flag restricted to guest:lacks requested flag"
msg_unknow = "not found"
Host_RHEL.7:
msg_unavailable = "host doesn't support requested feature"
msg_unknow = "not found"
variants:
- intel_model:
auto_cpu_model = "no"
...
...
qemu/tests/enforce_quit.py
浏览文件 @
c0fc8516
...
...
@@ -41,19 +41,23 @@ def run(test, params, env):
if
"enforce"
not
in
extra_flags
:
raise
error
.
TestError
(
"pls add 'enforce' params to the cmd line"
)
msg_res
=
params
.
get
(
"msg_restricted"
,
"flag restricted to guest"
)
msg_lack
=
params
.
get
(
"msg_lack"
,
"lacks requested flag"
)
msg_unavailable
=
params
.
get
(
"msg_unavailable"
,
""
).
split
(
":"
)
msg_unknow
=
params
.
get
(
"msg_unknow"
,
"not found"
)
try
:
error
.
context
(
"boot guest with -cpu %s,%s"
%
(
guest_cpumodel
,
extra_flags
),
logging
.
info
)
extra_flags
),
logging
.
info
)
params
[
"start_vm"
]
=
"yes"
env_process
.
preprocess_vm
(
test
,
params
,
env
,
params
.
get
(
"main_vm"
))
except
Exception
,
e
:
if
msg_lack
in
str
(
e
)
or
msg_res
in
str
(
e
)
or
msg_unknow
in
str
(
e
):
logging
.
info
(
"flags lacked in host, guest force quit"
)
except
Exception
,
err
:
tmp_flag
=
False
for
msg
in
msg_unavailable
:
if
msg
in
str
(
err
):
tmp_flag
=
True
if
tmp_flag
or
msg_unknow
in
str
(
err
):
logging
.
info
(
"unavailable host feature, guest force quit"
)
else
:
raise
error
.
TestFail
(
"guest quit with error
\n
%s"
%
str
(
e
))
raise
error
.
TestFail
(
"guest quit with error
\n
%s"
%
str
(
e
rr
))
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
if
force_quit
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录