Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
68c1a02a
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,发现更多精彩内容 >>
提交
68c1a02a
编写于
4月 11, 2018
作者:
X
Xu Han
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixup function hash_file
Correct the parameter name. Signed-off-by:
N
Xu Han
<
xuhan@redhat.com
>
上级
921b65f8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
4 addition
and
4 deletion
+4
-4
generic/tests/ethtool.py
generic/tests/ethtool.py
+1
-1
generic/tests/nicdriver_unload.py
generic/tests/nicdriver_unload.py
+1
-1
qemu/tests/live_snapshot_base.py
qemu/tests/live_snapshot_base.py
+2
-2
未找到文件。
generic/tests/ethtool.py
浏览文件 @
68c1a02a
...
@@ -100,7 +100,7 @@ def run(test, params, env):
...
@@ -100,7 +100,7 @@ def run(test, params, env):
def
compare_md5sum
(
name
):
def
compare_md5sum
(
name
):
txt
=
"Comparing md5sum of the files on guest and host"
txt
=
"Comparing md5sum of the files on guest and host"
error_context
.
context
(
txt
,
logging
.
info
)
error_context
.
context
(
txt
,
logging
.
info
)
host_result
=
crypto
.
hash_file
(
name
,
method
=
"md5"
)
host_result
=
crypto
.
hash_file
(
name
,
algorithm
=
"md5"
)
try
:
try
:
o
=
session
.
cmd_output
(
"md5sum %s"
%
name
)
o
=
session
.
cmd_output
(
"md5sum %s"
%
name
)
guest_result
=
re
.
findall
(
r
"\w+"
,
o
)[
0
]
guest_result
=
re
.
findall
(
r
"\w+"
,
o
)[
0
]
...
...
generic/tests/nicdriver_unload.py
浏览文件 @
68c1a02a
...
@@ -94,7 +94,7 @@ def run(test, params, env):
...
@@ -94,7 +94,7 @@ def run(test, params, env):
utils_misc
.
generate_random_string
(
8
))
utils_misc
.
generate_random_string
(
8
))
cmd
=
"dd if=/dev/zero of=%s bs=1M count=%d"
%
(
host_path
,
filesize
)
cmd
=
"dd if=/dev/zero of=%s bs=1M count=%d"
%
(
host_path
,
filesize
)
process
.
run
(
cmd
)
process
.
run
(
cmd
)
file_checksum
=
crypto
.
hash_file
(
host_path
,
"md5"
)
file_checksum
=
crypto
.
hash_file
(
host_path
,
algorithm
=
"md5"
)
error_context
.
context
(
"Guest test file prepare, Copy file %s from host to "
error_context
.
context
(
"Guest test file prepare, Copy file %s from host to "
"guest"
%
host_path
,
logging
.
info
)
"guest"
%
host_path
,
logging
.
info
)
...
...
qemu/tests/live_snapshot_base.py
浏览文件 @
68c1a02a
...
@@ -45,7 +45,7 @@ def run(test, params, env):
...
@@ -45,7 +45,7 @@ def run(test, params, env):
logging
.
info
)
logging
.
info
)
cmd
=
params
.
get
(
"dd_cmd"
)
%
src
cmd
=
params
.
get
(
"dd_cmd"
)
%
src
process
.
system
(
cmd
,
timeout
=
dd_timeout
,
shell
=
True
)
process
.
system
(
cmd
,
timeout
=
dd_timeout
,
shell
=
True
)
md5
=
crypto
.
hash_file
(
src
,
method
=
"md5"
)
md5
=
crypto
.
hash_file
(
src
,
algorithm
=
"md5"
)
vm
.
copy_files_to
(
src
,
dst
,
timeout
=
copy_timeout
)
vm
.
copy_files_to
(
src
,
dst
,
timeout
=
copy_timeout
)
process
.
system
(
"rm -f %s"
%
src
)
process
.
system
(
"rm -f %s"
%
src
)
error_context
.
context
(
"create live snapshot"
,
logging
.
info
)
error_context
.
context
(
"create live snapshot"
,
logging
.
info
)
...
@@ -60,7 +60,7 @@ def run(test, params, env):
...
@@ -60,7 +60,7 @@ def run(test, params, env):
error_context
.
context
(
"copy file to host, check content not changed"
,
error_context
.
context
(
"copy file to host, check content not changed"
,
logging
.
info
)
logging
.
info
)
vm
.
copy_files_from
(
dst
,
src
,
timeout
=
copy_timeout
)
vm
.
copy_files_from
(
dst
,
src
,
timeout
=
copy_timeout
)
if
md5
and
(
md5
!=
crypto
.
hash_file
(
src
,
method
=
"md5"
)):
if
md5
and
(
md5
!=
crypto
.
hash_file
(
src
,
algorithm
=
"md5"
)):
test
.
fail
(
"diff md5 before/after create snapshot"
)
test
.
fail
(
"diff md5 before/after create snapshot"
)
session
.
cmd
(
params
.
get
(
"alive_check_cmd"
,
"dir"
))
session
.
cmd
(
params
.
get
(
"alive_check_cmd"
,
"dir"
))
finally
:
finally
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录