Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
fa31e236
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,发现更多精彩内容 >>
未验证
提交
fa31e236
编写于
4月 22, 2020
作者:
Y
YongxueHong
提交者:
GitHub
4月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2194 from aliang123/1823707
blockdev_commit_stress:commit during stress test
上级
b6e2f08d
3ff34f93
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
0 deletion
+78
-0
qemu/tests/blockdev_commit_stress.py
qemu/tests/blockdev_commit_stress.py
+51
-0
qemu/tests/cfg/blockdev_commit_stress.cfg
qemu/tests/cfg/blockdev_commit_stress.cfg
+27
-0
未找到文件。
qemu/tests/blockdev_commit_stress.py
0 → 100644
浏览文件 @
fa31e236
from
virttest
import
utils_test
from
provider.blockdev_commit_base
import
BlockDevCommitTest
class
BlockdevCommitStress
(
BlockDevCommitTest
):
def
run_stress_test
(
self
):
self
.
stress_test
=
utils_test
.
VMStress
(
self
.
main_vm
,
"stress"
,
self
.
params
)
self
.
stress_test
.
load_stress_tool
()
def
stress_running_check
(
self
):
if
not
self
.
stress_test
.
app_running
():
self
.
test
.
fail
(
"Stress app does not running as expected"
)
def
pre_test
(
self
):
if
not
self
.
main_vm
.
is_alive
():
self
.
main_vm
.
create
()
self
.
main_vm
.
verify_alive
()
for
device
in
self
.
params
[
"device_tag"
].
split
():
device_params
=
self
.
params
.
object_params
(
device
)
snapshot_tags
=
device_params
[
"snapshot_tags"
].
split
()
self
.
device_node
=
self
.
get_node_name
(
device
)
self
.
configure_disk
(
device
)
self
.
run_stress_test
()
self
.
prepare_snapshot_file
(
snapshot_tags
)
self
.
create_snapshots
(
snapshot_tags
,
device
)
def
run_test
(
self
):
self
.
pre_test
()
try
:
self
.
commit_snapshots
()
self
.
stress_running_check
()
self
.
verify_data_file
()
finally
:
self
.
post_test
()
def
run
(
test
,
params
,
env
):
"""
Block commit base Test
1. boot guest with system disk
2. run stress test in guest
3. create 4 snapshots and save file in each snapshot
4. commit snapshot 3 to base
5. verify if stress test still running and verify file's md5 after commit
"""
block_test
=
BlockdevCommitStress
(
test
,
params
,
env
)
block_test
.
run_test
()
qemu/tests/cfg/blockdev_commit_stress.cfg
0 → 100644
浏览文件 @
fa31e236
- blockdev_commit_stress:
type = blockdev_commit_stress
virt_test_type = qemu
only Linux
start_vm = yes
kill_vm = yes
storage_pools = default
storage_type_default = "directory"
storage_pool = default
snapshot_tags = sn1 sn2 sn3 sn4
image_name_sn1 = sn1
image_format_sn1 = qcow2
image_name_sn2 = sn2
image_format_sn2 = qcow2
image_name_sn3 = sn3
image_format_sn3 = qcow2
image_name_sn4 = sn4
image_format_sn4 = qcow2
device_tag = "image1"
rebase_mode = unsafe
mount_point = "/tmp"
qemu_force_use_drive_expression = no
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录