Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
23c0f57b
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,发现更多精彩内容 >>
提交
23c0f57b
编写于
10月 12, 2018
作者:
Y
yama
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu_guest_agent.py: check the default path of fsfreeze-hook
Signed-off-by:
N
yama
<
yama@redhat.com
>
上级
a8b73bca
变更
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
+10
-0
qemu/tests/qemu_guest_agent.py
qemu/tests/qemu_guest_agent.py
+28
-0
未找到文件。
qemu/tests/cfg/qemu_guest_agent.cfg
浏览文件 @
23c0f57b
...
...
@@ -149,6 +149,16 @@
disk_write_cmd = "dd if=/dev/zero of=%s/file bs=1M count=4"
Windows:
disk_write_cmd = "cd %s:\ && echo test > a.txt"
- check_path_fsfreeze_hook:
no Windows
gagent_check_type = path_fsfreeze_hook
gagent_help_cmd = "qemu-ga --help | grep 'fsfreeze-hook' | tail -1"
gagent_path_cmd = "rpm -ql qemu-guest-agent"
virtio_serial:
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"
variants:
- virtio_serial:
gagent_serial_type = virtio
...
...
qemu/tests/qemu_guest_agent.py
浏览文件 @
23c0f57b
...
...
@@ -1009,6 +1009,34 @@ class QemuGuestAgentBasicCheck(QemuGuestAgentTest):
utils_disk
.
umount
(
new_disks
[
0
],
mnt_point
[
0
],
session
=
session
)
session
.
close
()
@
error_context
.
context_aware
def
gagent_check_path_fsfreeze_hook
(
self
,
test
,
params
,
env
):
"""
Check if the default path of fsfreeze-hook is correct
:param test: kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment
"""
session
=
self
.
_get_session
(
params
,
self
.
vm
)
self
.
gagent_stop
(
session
,
self
.
vm
)
error_context
.
context
(
"Start gagent with -F option"
,
logging
.
info
)
self
.
gagent_start
(
session
,
self
.
vm
)
gagent_path_cmd
=
params
[
"gagent_path_cmd"
]
error_context
.
context
(
"Check if default path of fsfreeze-hook is in "
"output of %s"
%
gagent_path_cmd
,
logging
.
info
)
s
,
o
=
session
.
cmd_status_output
(
params
[
"gagent_help_cmd"
])
help_cmd_output
=
o
.
strip
().
replace
(
')'
,
''
).
split
()[
-
1
]
s
,
o
=
session
.
cmd_status_output
(
gagent_path_cmd
)
if
help_cmd_output
in
o
:
logging
.
info
(
"The default path for script 'fsfreeze-hook' is "
"in output of %s."
%
gagent_path_cmd
)
error_context
.
context
(
"Execute 'guest-fsfreeze-freeze'"
,
logging
.
info
)
self
.
gagent
.
fsfreeze
()
self
.
gagent
.
fsthaw
()
else
:
test
.
fail
(
"The default path of fsfreeze-hook doesn't match with expectation."
)
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录