Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
b082e0de
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,发现更多精彩内容 >>
未验证
提交
b082e0de
编写于
4月 23, 2020
作者:
Y
Yanan Fu
提交者:
GitHub
4月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2198 from nanliu-r/boot_N_M
virtio-serial: boot guest with multiple pcis with multiple ports
上级
be916d60
0a26d2ad
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
53 addition
and
3 deletion
+53
-3
qemu/tests/boot_N_M_virtserialports.py
qemu/tests/boot_N_M_virtserialports.py
+42
-0
qemu/tests/cfg/virtio_serial_file_transfer.cfg
qemu/tests/cfg/virtio_serial_file_transfer.cfg
+11
-3
未找到文件。
qemu/tests/boot_
1_N
_virtserialports.py
→
qemu/tests/boot_
N_M
_virtserialports.py
浏览文件 @
b082e0de
import
logging
from
virttest
import
error_context
from
virttest
import
utils_test
from
qemu.tests.virtio_serial_file_transfer
import
transfer_data
@
error_context
.
context_aware
def
run
(
test
,
params
,
env
):
"""
Boot guest with virtio-serial-device with multiple virtserialport
1. Boot a guest with 1 virtio-serial-bus with 3 serial ports
2. Transfer data from host to guest via port2, port3
3. Transfer data from guest to host via port2, port3
Test guest with virtio-serial-device with multiple virtserialports
Scenario 1:
1.1. Boot a guest with 1 virtio-serial-bus with 3 serial ports
1.2. Transfer data via every port
Scenario 2:
2.1. Start guest with 2 virtio-serial-pci,
2.2. Each virtio-serial-pci has 3 virtio-serial-ports
2.3. Transfer data via every port
:param test: kvm test object
:param params: Dictionary with the test parameters
...
...
@@ -19,16 +23,20 @@ def run(test, params, env):
"""
os_type
=
params
[
"os_type"
]
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
driver_name
=
params
[
"driver_name"
]
session
=
vm
.
wait_for_login
()
vm
=
env
.
get_vm
(
params
[
'main_vm'
])
if
os_type
==
"windows"
:
driver_name
=
params
[
"driver_name"
]
session
=
vm
.
wait_for_login
()
session
=
utils_test
.
qemu
.
windrv_check_running_verifier
(
session
,
vm
,
test
,
driver_name
)
for
port
in
params
.
objects
(
"serials"
)[
2
:]:
session
.
close
()
for
port
in
params
.
objects
(
"serials"
):
port_params
=
params
.
object_params
(
port
)
if
not
port_params
[
'serial_type'
].
startswith
(
'virt'
):
if
not
port_params
[
'serial_type'
].
startswith
(
'virt
serial
'
):
continue
params
[
'file_transfer_serial_port'
]
=
port
error_context
.
context
(
"Transfer data with %s"
%
port
,
logging
.
info
)
transfer_data
(
params
,
vm
,
sender
=
'both'
)
vm
.
verify_alive
()
vm
.
verify_kernel_crash
()
qemu/tests/cfg/virtio_serial_file_transfer.cfg
浏览文件 @
b082e0de
...
...
@@ -30,14 +30,22 @@
- from_guest_to_host:
file_sender = guest
- boot_with_multiple_virtserialports:
type = boot_N_M_virtserialports
only unix_socket
filesize = 512
variants:
- 1_N:
only unix_socket
type = boot_1_N_virtserialports
driver_name = vioser
serials += " vs2 vs3"
serial_type_vs2 = virtserialport
serial_type_vs3 = virtserialport
- N_M:
serials += " vs2 vs3 vs4 vs5 vs6"
serial_type_vs2 = virtserialport
serial_type_vs3 = virtserialport
serial_type_vs4 = virtserialport
serial_reuse_bus_vs4 = no
serial_type_vs5 = virtserialport
serial_type_vs6 = virtserialport
- max_ports:
only unix_socket
type = virtio_serial_file_transfer_max_ports
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录