Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
e5ecd86f
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,发现更多精彩内容 >>
提交
e5ecd86f
编写于
7月 20, 2016
作者:
C
Cong Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu.tests: Add new case of live snapshot during installation.
Signed-off-by:
N
Cong Li
<
coli@redhat.com
>
上级
be38f2ab
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
3 deletion
+38
-3
qemu/tests/cfg/live_snapshot.cfg
qemu/tests/cfg/live_snapshot.cfg
+17
-0
qemu/tests/live_snapshot.py
qemu/tests/live_snapshot.py
+21
-3
未找到文件。
qemu/tests/cfg/live_snapshot.cfg
浏览文件 @
e5ecd86f
...
...
@@ -36,6 +36,23 @@
filesize = 2000
transfer_timeout = 1200
tmp_dir = /var/tmp/
- with_installation:
subcommand = installation
need_install = yes
start_vm = no
images = "stg"
image_name_stg = "images/live_snapshot_base"
image_size_stg = 20G
boot_drive_stg = yes
medium = cdrom
installation = cdrom
kernel = vmlinuz
initrd = initrd.img
force_create_image_stg = yes
image_aio = threads
unattended_delivery_method = cdrom
cdroms += " unattended"
index_enable = no
- base:
type = live_snapshot_base
backup_image_before_testing = yes
...
...
qemu/tests/live_snapshot.py
浏览文件 @
e5ecd86f
...
...
@@ -2,6 +2,7 @@ import time
import
logging
from
autotest.client.shared
import
error
from
autotest.client.shared
import
utils
from
virttest
import
utils_test
...
...
@@ -43,11 +44,12 @@ def run(test, params, env):
logging
.
error
(
snapshot_info
)
raise
error
.
TestFail
(
"Snapshot doesn't exist"
)
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
.
verify_alive
()
timeout
=
int
(
params
.
get
(
"login_timeout"
,
360
))
dd_timeout
=
int
(
params
.
get
(
"dd_timeout"
,
900
))
session
=
vm
.
wait_for_login
(
timeout
=
timeout
)
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
if
params
.
get
(
"need_install"
,
"no"
)
==
"no"
:
vm
.
verify_alive
()
session
=
vm
.
wait_for_login
(
timeout
=
timeout
)
def
runtime_test
():
try
:
...
...
@@ -102,5 +104,21 @@ def run(test, params, env):
raise
finally
:
session
.
close
()
def
installation_test
():
args
=
(
test
,
params
,
env
)
bg
=
utils
.
InterruptedThread
(
utils_test
.
run_virt_sub_test
,
args
,
{
"sub_type"
:
"unattended_install"
})
bg
.
start
()
if
bg
.
is_alive
():
sleep_time
=
int
(
params
.
get
(
"sleep_time"
,
60
))
time
.
sleep
(
sleep_time
)
create_snapshot
(
vm
)
try
:
bg
.
join
()
except
Exception
:
raise
subcommand
=
params
.
get
(
"subcommand"
)
eval
(
"%s_test()"
%
subcommand
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录