Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
f84b12c5
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,发现更多精彩内容 >>
提交
f84b12c5
编写于
8月 31, 2016
作者:
C
Cong
提交者:
GitHub
8月 31, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #716 from CongLi/transaction
qemu.tests: Add case for successful live snapshot transaction.
上级
a7f0ebab
3c564a60
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
57 addition
and
0 deletion
+57
-0
qemu/tests/cfg/live_snapshot.cfg
qemu/tests/cfg/live_snapshot.cfg
+9
-0
qemu/tests/live_snapshot_transaction.py
qemu/tests/live_snapshot_transaction.py
+48
-0
未找到文件。
qemu/tests/cfg/live_snapshot.cfg
浏览文件 @
f84b12c5
...
...
@@ -81,3 +81,12 @@
- existing_mode:
snapshot_mode = "existing"
match_str = "Could not open '%s': No such file or directory"
- transaction:
type = live_snapshot_transaction
images += " sn1 sn2"
image_name_sn1 = "images/sn1"
image_name_sn2 = "images/sn2"
check_base_image = yes
force_create_image = yes
force_create_image_image1 = no
after_finished = "reboot verify_alive"
qemu/tests/live_snapshot_transaction.py
0 → 100644
浏览文件 @
f84b12c5
import
logging
from
autotest.client.shared
import
error
from
qemu.tests
import
live_snapshot_basic
@
error
.
context_aware
def
run
(
test
,
params
,
env
):
"""
live_snapshot_transaction test:
1. Boot up guest with a system disk and 2 data disk.
2. Create multiple live snapshots simultaneously for all 3 disks with transaction.
3. Check guest which should boot up and reboot successfully.
:param test: Kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
arg_list
=
[]
try
:
for
image
in
params
.
objects
(
"images"
):
image_params
=
params
.
object_params
(
image
)
transaction_test
=
live_snapshot_basic
.
LiveSnapshot
(
test
,
image_params
,
env
,
image
)
transaction_test
.
snapshot_args
.
update
({
"device"
:
transaction_test
.
device
})
transaction_test
.
snapshot_file
=
image
+
"-snap"
snapshot_file
=
transaction_test
.
get_snapshot_file
()
transaction_test
.
snapshot_args
.
update
({
"snapshot-file"
:
snapshot_file
})
args
=
{
"type"
:
"blockdev-snapshot-sync"
,
"data"
:
transaction_test
.
snapshot_args
}
arg_list
.
append
(
args
)
error
.
context
(
"Create multiple live snapshots simultaneously"
" with transaction"
,
logging
.
info
)
output
=
transaction_test
.
vm
.
monitor
.
transaction
(
arg_list
)
# return nothing on successful transaction
if
bool
(
output
):
raise
error
.
TestFail
(
"Live snapshot transatcion failed,"
" there should be nothing on success.
\n
"
"More details: %s"
%
output
)
transaction_test
.
action_after_finished
()
finally
:
try
:
transaction_test
.
clean
()
except
Exception
:
pass
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录