Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
f0dc168d
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,发现更多精彩内容 >>
提交
f0dc168d
编写于
7月 16, 2013
作者:
X
Xu Tian
提交者:
Lucas Meneghel Rodrigues
8月 06, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu.tests: update powerup with target image step
Signed-off-by:
N
Xu Tian
<
xutian@redhat.com
>
上级
04aec136
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
32 deletion
+14
-32
qemu/tests/drive_mirror_powerdown.py
qemu/tests/drive_mirror_powerdown.py
+14
-32
未找到文件。
qemu/tests/drive_mirror_powerdown.py
浏览文件 @
f0dc168d
import
logging
from
virttest
import
storage
,
data_dir
from
autotest.client.shared
import
error
,
utils
from
virttest
import
env_process
from
autotest.client.shared
import
error
from
qemu.tests
import
drive_mirror_stress
class
DriveMirrorPowerdown
(
drive_mirror_stress
.
DriveMirrorStress
):
def
__init__
(
self
,
test
,
params
,
env
,
tag
):
super
(
DriveMirrorPowerdown
,
self
).
__init__
(
test
,
params
,
env
,
tag
)
params
=
self
.
params
.
object_params
(
self
.
tag
)
image_file
=
storage
.
get_image_filename
(
params
,
data_dir
.
get_data_dir
())
self
.
params
[
"image_file"
]
=
image_file
@
error
.
context_aware
def
powerdown
(
self
):
"""
power down guest via quit qemu;
"""
params
=
self
.
parser_test_args
()
error
.
context
(
"powerdown vm"
,
logging
.
info
)
self
.
vm
.
destroy
()
error
.
context
(
"backup base image"
,
logging
.
info
)
image_file
=
params
.
get
(
"image_file"
)
cmd
=
"mv %s %s-bak"
%
(
image_file
,
image_file
)
utils
.
system
(
cmd
)
return
return
self
.
vm
.
destroy
()
@
error
.
context_aware
def
powerup
(
self
):
"""
bootup guest with target image, same as reopen new image;
steps are:
1). backup base image, move target image as base image
2). bootup guest with target image;
bootup guest with target image;
"""
params
=
self
.
parser_test_args
()
image_file
=
params
.
get
(
"image_file"
)
target_image
=
params
.
get
(
"target_image"
)
cmd
=
"mv -f %s %s"
%
(
target_image
,
image_file
)
error
.
context
(
"copy target image"
)
utils
.
system
(
cmd
)
vm_name
=
params
[
'main_vm'
]
self
.
params
[
"image_name"
]
=
params
[
"target_image"
]
self
.
params
[
"image_format"
]
=
params
[
"target_format"
]
logging
.
info
(
"Target image: %s"
%
self
.
target_image
)
error
.
context
(
"powerup vm with target image"
,
logging
.
info
)
self
.
vm
.
create
()
def
clean
(
self
):
params
=
self
.
parser_test_args
()
image_file
=
params
.
get
(
"image_file"
)
super
(
DriveMirrorPowerdown
,
self
).
clean
()
cmd
=
"mv -f %s-bak %s"
%
(
image_file
,
image_file
)
utils
.
system
(
cmd
)
env_process
.
preprocess_vm
(
self
.
test
,
self
.
params
,
self
.
env
,
vm_name
)
vm
=
self
.
env
.
get_vm
(
vm_name
)
vm
.
verify_alive
()
self
.
vm
=
vm
def
run_drive_mirror_powerdown
(
test
,
params
,
env
):
"""
drive_mirror_powerdown test:
1). boot guest, do kernel build
3). mirror disk to target image
4). wait
go into steady status,
then quit qemu
3). mirror
boot
disk to target image
4). wait
mirroring go into ready status
then quit qemu
5). bootup guest with target image
6). check guest can response correctly
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录