Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
0935de4b
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,发现更多精彩内容 >>
未验证
提交
0935de4b
编写于
12月 26, 2019
作者:
L
Longxiang Lyu
提交者:
GitHub
12月 26, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2036 from hellohellenmao/1785120
New case of image_creation_lock_release
上级
0154ea7e
8eb73c98
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
36 addition
and
0 deletion
+36
-0
qemu/tests/cfg/image_creation_lock_release.cfg
qemu/tests/cfg/image_creation_lock_release.cfg
+7
-0
qemu/tests/image_creation_lock_release.py
qemu/tests/image_creation_lock_release.py
+29
-0
未找到文件。
qemu/tests/cfg/image_creation_lock_release.cfg
0 → 100755
浏览文件 @
0935de4b
- image_creation_lock_release:
virt_test_type = qemu
type = image_creation_lock_release
start_vm = no
create_image = no
remove_image = yes
images = "lock_test"
qemu/tests/image_creation_lock_release.py
0 → 100755
浏览文件 @
0935de4b
from
avocado.utils
import
process
from
virttest
import
data_dir
from
virttest.qemu_storage
import
QemuImg
def
run
(
test
,
params
,
env
):
"""
Image creation locking should be properly released.
1. Create raw image and close it after 0.5 sec.
2. Check there is no lock error of the CML.
:param test: Qemu test object.
:param params: Dictionary with the test parameters.
:param env: Dictionary with test environment.
"""
lock_test
=
params
[
"images"
]
root_dir
=
data_dir
.
get_data_dir
()
test_image
=
QemuImg
(
params
.
object_params
(
lock_test
),
root_dir
,
lock_test
)
test_filename
=
test_image
.
image_filename
lock_err_info
=
'Failed to get "consistent read" lock'
try
:
process
.
run
(
"qemu-img create -f raw -o preallocation=full %s 1G & "
"sleep 0.5;qemu-io -c info -c close -r %s"
%
(
test_filename
,
test_filename
),
shell
=
True
)
except
process
.
CmdError
as
err
:
if
lock_err_info
in
err
.
result
.
stderr
.
decode
():
test
.
fail
(
"Image lock not released: %s"
%
err
)
else
:
test
.
error
(
"Command line failed: %s"
%
err
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录