Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
7f53aaca
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,发现更多精彩内容 >>
提交
7f53aaca
编写于
9月 18, 2017
作者:
X
Xu Han
提交者:
GitHub
9月 18, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1054 from aliang123/1467485
New case: boot guest under different machine type with data plane enable
上级
f2dbedcd
3d219e48
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
63 addition
and
4 deletion
+63
-4
qemu/tests/boot_with_machine_types.py
qemu/tests/boot_with_machine_types.py
+54
-0
qemu/tests/cfg/data_plane_boot.cfg
qemu/tests/cfg/data_plane_boot.cfg
+9
-4
未找到文件。
qemu/tests/boot_with_machine_types.py
0 → 100644
浏览文件 @
7f53aaca
import
logging
import
re
from
virttest
import
error_context
from
virttest
import
utils_misc
from
virttest
import
env_process
@
error_context
.
context_aware
def
run
(
test
,
params
,
env
):
"""
boot with different machine type:
1) get supported machine type
2) boot guest with different machine types
:param test: kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
error_context
.
context
(
"Get supported machine type"
,
logging
.
info
)
qemu_binary
=
utils_misc
.
get_qemu_binary
(
params
)
machine_types
=
[]
machine_type_mapping
=
{
"pc"
:
[
"i440FX"
,
"RHEL 6"
],
"q35"
:
[
"Q35"
],
"pseries"
:
[
"pSeries"
],
"arm64-pci:virt"
:
[
"ARM"
],
"arm64-mmio:virt"
:
[
"ARM"
],
"s390-ccw-virtio"
:
[
"S390"
]}
for
m_type
,
s_name
in
zip
(
*
utils_misc
.
get_support_machine_type
(
qemu_binary
)):
for
item
in
machine_type_mapping
[
params
[
"machine_type"
]]:
if
item
in
s_name
:
if
"arm64"
in
params
[
"machine_type"
]:
m_type
=
re
.
sub
(
r
'(?<=:)\w+'
,
m_type
,
params
[
"machine_type"
])
machine_types
.
append
(
m_type
)
if
not
machine_types
:
test
.
fail
(
"Failed to get machine types"
)
else
:
logging
.
info
(
"Actual supported machine types are: "
+
', '
.
join
(
map
(
str
,
machine_types
)))
for
m_type
in
machine_types
:
params
[
"machine_type"
]
=
m_type
params
[
"start_vm"
]
=
"yes"
vm_name
=
params
[
'main_vm'
]
error_context
.
context
(
"Start vm with machine type '%s'"
%
m_type
,
logging
.
info
)
env_process
.
preprocess
(
test
,
params
,
env
)
vm
=
env
.
get_vm
(
vm_name
)
vm
.
verify_alive
()
timeout
=
int
(
params
.
get
(
"login_timeout"
,
360
))
session
=
vm
.
wait_for_login
(
timeout
=
timeout
)
if
not
session
.
is_responsive
():
session
.
close
()
test
.
fail
(
"Start vm with machine type:%s fail"
%
m_type
)
session
.
close
()
error_context
.
context
(
"Quit guest and check the process quit normally"
,
logging
.
info
)
vm
.
destroy
(
gracefully
=
False
)
qemu/tests/cfg/data_plane_
snapsh
ot.cfg
→
qemu/tests/cfg/data_plane_
bo
ot.cfg
浏览文件 @
7f53aaca
- data_plane_
snapsh
ot:
- data_plane_
bo
ot:
virt_test_type = qemu
virt_test_type = qemu
type = boot
no Host_RHEL.m6
image_snapshot = yes
only Host_RHEL.m7
only virtio_blk virtio_scsi
only virtio_blk virtio_scsi
iothreads = iothread0
iothreads = iothread0
virtio_blk:
virtio_blk:
...
@@ -10,3 +8,10 @@
...
@@ -10,3 +8,10 @@
virtio_scsi:
virtio_scsi:
no Host_RHEL.m7.u0, Host_RHEL.m7.u1, Host_RHEL.m7.u2
no Host_RHEL.m7.u0, Host_RHEL.m7.u1, Host_RHEL.m7.u2
bus_extra_params_image1 = "iothread=${iothreads}"
bus_extra_params_image1 = "iothread=${iothreads}"
variants:
- snapshot:
type = boot
image_snapshot = yes
- machine_type:
type = boot_with_machine_types
start_vm = no
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录