Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
ade32840
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,发现更多精彩内容 >>
未验证
提交
ade32840
编写于
1月 05, 2018
作者:
X
Xu Han
提交者:
GitHub
1月 05, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1188 from ldoktor/virtio_console
virtio_console: Treat virtio-serial-*
上级
480d6970
03c83bb1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
10 deletion
+28
-10
qemu/tests/cfg/virtio_console.cfg
qemu/tests/cfg/virtio_console.cfg
+3
-3
qemu/tests/virtio_console.py
qemu/tests/virtio_console.py
+25
-7
未找到文件。
qemu/tests/cfg/virtio_console.cfg
浏览文件 @
ade32840
...
...
@@ -229,12 +229,12 @@
virtio_port_type_vs1 = serialport
virtio_port_params_vs1 = "nr=1"
- boot_too_much_ports:
# arm doesn't use pci bus
no a
arch64
# arm
-mmio
doesn't use pci bus
no a
rm64-mmio
# max_ports extended in rhev7: "rhev7,lower_version"
max_ports_invalid = "512,32"
max_ports_valid = "511,31"
extra_params = " -device
virtio-serial-pci
,max_ports=%s"
extra_params = " -device
%s
,max_ports=%s"
start_vm = no
virtio_console_test = failed_boot
virtio_console_params = "maximum ports supported: %s"
...
...
qemu/tests/virtio_console.py
浏览文件 @
ade32840
...
...
@@ -58,6 +58,14 @@ def run(test, params, env):
"""
virtio_test
=
VirtioPortTest
(
test
,
env
,
params
)
def
get_virtio_serial_name
():
if
params
.
get
(
"machine_type"
).
startswith
(
"arm64-mmio"
):
return
"virtio-serial-device"
elif
params
.
get
(
'machine_type'
).
startswith
(
"s390"
):
return
"virtio-serial-ccw"
else
:
return
"virtio-serial-pci"
#
# Smoke tests
#
...
...
@@ -1397,8 +1405,8 @@ def run(test, params, env):
consoles
[
1
][
0
].
sock
.
setblocking
(
0
)
logging
.
info
(
"Test correct initialization of hotplug ports"
)
for
bus_id
in
xrange
(
1
,
5
):
# count of pci device
ret
=
vm
.
monitors
[
0
].
cmd
(
"device_add
virtio-serial-pci,
"
"id=virtio_serial_pci%d"
%
(
bus_id
))
ret
=
vm
.
monitors
[
0
].
cmd
(
"device_add
%s,id=virtio_serial_pci%d
"
%
(
get_virtio_serial_name
(),
bus_id
))
if
ret
!=
""
:
logging
.
error
(
ret
)
for
i
in
xrange
(
bus_id
*
5
+
5
):
# max ports 30
...
...
@@ -1488,12 +1496,17 @@ def run(test, params, env):
err
=
""
booted
=
False
error_context
.
context
(
"Hotplug while booting"
,
logging
.
info
)
vio_type
=
get_virtio_serial_name
()
if
"pci"
in
vio_type
:
vio_parent_bus
=
{
'aobject'
:
'pci.0'
}
else
:
vio_parent_bus
=
None
for
i
in
xrange
(
int
(
params
.
get
(
"virtio_console_loops"
,
10
))):
error_context
.
context
(
"Hotpluging virtio_pci (iteration %d)"
%
i
)
vm
.
devices
.
set_dirty
()
new_dev
=
qdevices
.
QDevice
(
"virtio-serial-pci"
,
new_dev
=
qdevices
.
QDevice
(
vio_type
,
{
'id'
:
'virtio_serial_pci%d'
%
idx
},
parent_bus
=
{
'aobject'
:
'pci.0'
}
)
parent_bus
=
vio_parent_bus
)
# Hotplug
out
=
new_dev
.
hotplug
(
monitor
)
...
...
@@ -1791,10 +1804,15 @@ def run(test, params, env):
output_list
=
re_comp
.
findall
(
output
)
# high version
if
re
.
search
(
qemu_version_pattern
,
output_list
[
0
]):
params
[
"extra_params"
]
=
(
params
[
"extra_params"
]
%
max_ports_invalid
[
0
])
exp_error_message
=
(
params
[
'virtio_console_params'
]
%
max_ports_valid
[
0
])
params
[
"extra_params"
]
=
(
params
[
"extra_params"
]
%
(
get_virtio_serial_name
(),
max_ports_invalid
[
0
]))
exp_error_message
=
(
params
[
'virtio_console_params'
]
%
max_ports_valid
[
0
])
else
:
params
[
"extra_params"
]
=
(
params
[
"extra_params"
]
%
max_ports_invalid
[
1
])
params
[
"extra_params"
]
=
(
params
[
"extra_params"
]
%
(
get_virtio_serial_name
(),
max_ports_invalid
[
1
]))
exp_error_message
=
(
params
[
'virtio_console_params'
]
%
max_ports_valid
[
1
])
env_process
.
preprocess
(
test
,
params
,
env
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录