Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
3f85364d
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,发现更多精彩内容 >>
提交
3f85364d
编写于
12月 13, 2017
作者:
X
Xiyue Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
block_commit: add case with_reboot and stop_cont
Signed-off-by:
N
Xiyue Wang
<
xiywang@redhat.com
>
上级
1607c119
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
56 addition
and
0 deletion
+56
-0
qemu/tests/block_commit_reboot.py
qemu/tests/block_commit_reboot.py
+48
-0
qemu/tests/cfg/block_commit.cfg
qemu/tests/cfg/block_commit.cfg
+8
-0
未找到文件。
qemu/tests/block_commit_reboot.py
0 → 100644
浏览文件 @
3f85364d
import
time
import
random
import
logging
from
qemu.tests
import
blk_commit
class
BlockCommitReboot
(
blk_commit
.
BlockCommit
):
def
reboot
(
self
):
"""
Reset guest with system_reset;
"""
return
super
(
BlockCommitReboot
,
self
).
reboot
(
boot_check
=
False
)
def
action_when_start
(
self
):
"""
start pre-action in new threads;
"""
super
(
BlockCommitReboot
,
self
).
action_when_start
()
logging
.
info
(
"sleep for random time between 0 to 20, to perform "
"the block job during different stage of rebooting"
)
time
.
sleep
(
random
.
randint
(
0
,
20
))
def
run
(
test
,
params
,
env
):
"""
block_commit_reboot test:
1). boot a guest, then reboot the guest with system_reset;
2). create snapshots and start commit job immediately;
3). waiting commit done and check guest is alive;
:param test: Kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
tag
=
params
.
get
(
"source_image"
,
"image1"
)
reboot_test
=
BlockCommitReboot
(
test
,
params
,
env
,
tag
)
try
:
reboot_test
.
action_when_start
()
reboot_test
.
create_snapshots
()
reboot_test
.
start
()
reboot_test
.
action_after_finished
()
finally
:
try
:
reboot_test
.
clean
()
except
Exception
,
e
:
logging
.
warn
(
e
)
qemu/tests/cfg/block_commit.cfg
浏览文件 @
3f85364d
...
...
@@ -27,3 +27,11 @@
wait_timeout = 120
before_start = "load_stress"
after_finished = "unload_stress verify_backingfile reboot verify_alive"
- with_stop_cont:
before_start = "verify_alive stop"
after_finished = "resume reboot verify_alive"
- with_reboot:
type = block_commit_reboot
reboot_method = "system_reset"
when_start = "reboot"
after_finished = "verify_alive"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录