Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
bbfad606
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,发现更多精彩内容 >>
未验证
提交
bbfad606
编写于
10月 12, 2018
作者:
Q
Qianqian Zhu
提交者:
GitHub
10月 12, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1251 from YanhuiMa/agent_status
qemu_guest_agent.py: add case of checking guest agent status via qmp
上级
a887b638
04bb040b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
0 deletion
+38
-0
qemu/tests/cfg/qemu_guest_agent.cfg
qemu/tests/cfg/qemu_guest_agent.cfg
+3
-0
qemu/tests/qemu_guest_agent.py
qemu/tests/qemu_guest_agent.py
+35
-0
未找到文件。
qemu/tests/cfg/qemu_guest_agent.cfg
浏览文件 @
bbfad606
...
...
@@ -158,6 +158,9 @@
gagent_start_cmd = "qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 -F -d"
isa_serial:
gagent_start_cmd = "pgrep qemu-ga || qemu-ga -d -m isa-serial -p /dev/ttyS1 -F"
- gagent_query_chardev:
no isa_serial
gagent_check_type = query_chardev
variants:
- virtio_serial:
...
...
qemu/tests/qemu_guest_agent.py
浏览文件 @
bbfad606
...
...
@@ -1037,6 +1037,41 @@ class QemuGuestAgentBasicCheck(QemuGuestAgentTest):
else
:
test
.
fail
(
"The default path of fsfreeze-hook doesn't match with expectation."
)
@
error_context
.
context_aware
def
gagent_check_query_chardev
(
self
,
test
,
params
,
env
):
"""
Check guest agent service status through QMP 'query-chardev'
:param test: kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment
"""
def
check_value_frontend_open
(
out
,
expected
):
"""
Get value of 'frontend-open' after executing 'query-chardev'
:param out: output of executing 'query-chardev'
:param expected: expected value of 'frontend-open'
"""
for
chardev_dict
in
out
:
if
"org.qemu.guest_agent.0"
in
chardev_dict
[
"filename"
]:
ret
=
chardev_dict
[
"frontend-open"
]
if
ret
is
expected
:
break
else
:
test
.
fail
(
"The value of parameter 'frontend-open' "
"is %s, it should be %s"
%
(
ret
,
expected
))
error_context
.
context
(
"Execute query-chardev when guest agent service "
"is on"
,
logging
.
info
)
out
=
self
.
vm
.
monitor
.
query
(
"chardev"
)
check_value_frontend_open
(
out
,
True
)
session
=
self
.
_get_session
(
params
,
self
.
vm
)
self
.
gagent_stop
(
session
,
self
.
vm
)
error_context
.
context
(
"Execute query-chardev when guest agent service "
"is off"
,
logging
.
info
)
out
=
self
.
vm
.
monitor
.
query
(
"chardev"
)
check_value_frontend_open
(
out
,
False
)
session
.
close
()
def
run_once
(
self
,
test
,
params
,
env
):
QemuGuestAgentTest
.
run_once
(
self
,
test
,
params
,
env
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录