Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
90a43144
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,发现更多精彩内容 >>
提交
90a43144
编写于
12月 18, 2019
作者:
N
nanliu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virtio_serial: test ioeventfd property with virtio_serial_pci
Signed-off-by:
N
Nana Liu
<
nanliu@redhat.com
>
上级
0d2cbcc5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
71 addition
and
22 deletion
+71
-22
qemu/tests/cfg/ioeventfd.cfg
qemu/tests/cfg/ioeventfd.cfg
+42
-20
qemu/tests/ioeventfd.py
qemu/tests/ioeventfd.py
+29
-2
未找到文件。
qemu/tests/cfg/ioeventfd.cfg
浏览文件 @
90a43144
- ioeventfd: install setup image_copy unattended_install.cdrom
type = ioeventfd
only virtio_blk virtio_scsi
kill_vm_on_error = yes
login_timeout = 240
start_vm = no
orig_ioeventfd = "ioeventfd=off"
new_ioeventfd = "ioeventfd=on"
variants:
- under_stress:
io_stress = yes
reboot = yes
iozone_timeout = 7200
stress_timeout = 1200
Linux:
dd_cmd = 'dd if=/dev/zero of=/home/test_ioeventfd bs=1M count=4096 oflag=direct ; rm -rf /home/test_ioeventfd'
iozone_options = '-azR -r 64k -n 1G -g 4G -M -I -i 0 -i 1 -f /home/testfile'
Windows:
fio_options = "--rw=rw --bs=1M --iodepth=4 --direct=1 --filename=C:\fio-test --name=fiotest "
fio_options += "--ioengine=windowsaio --thread --group_reporting --numjobs=4 --size=1G && del C:\fio-test"
virtio_scsi:
driver_name = vioscsi
virtio_blk:
driver_name = viostor
iozone_path = 'WIN_UTILS:\Iozone\iozone.exe'
iozone_options = '-azR -r 64k -n 1G -g 4G -M -I -i 0 -i 1 -b iozone.xls -f c:\testfile'
- check_property:
variants dev_type:
- @block:
only virtio_blk virtio_scsi
variants:
- under_stress:
io_stress = yes
reboot = yes
iozone_timeout = 7200
stress_timeout = 1200
Linux:
dd_cmd = 'dd if=/dev/zero of=/home/test_ioeventfd bs=1M count=4096 oflag=direct ; rm -rf /home/test_ioeventfd'
iozone_options = '-azR -r 64k -n 1G -g 4G -M -I -i 0 -i 1 -f /home/testfile'
Windows:
fio_options = "--rw=rw --bs=1M --iodepth=4 --direct=1 --filename=C:\fio-test --name=fiotest "
fio_options += "--ioengine=windowsaio --thread --group_reporting --numjobs=4 --size=1G && del C:\fio-test"
virtio_scsi:
driver_name = vioscsi
virtio_blk:
driver_name = viostor
iozone_path = 'WIN_UTILS:\Iozone\iozone.exe'
iozone_options = '-azR -r 64k -n 1G -g 4G -M -I -i 0 -i 1 -b iozone.xls -f c:\testfile'
- check_property:
compare_fd = yes
- virtio_serial:
compare_fd = yes
serials += " vs1"
serial_type_vs1 = virtserialport
file_transfer_serial_port = vs1
data_transfer = yes
guest_scripts = VirtIoChannel_guest_send_receive.py;windows_support.py
guest_script_folder = /var/tmp/
file_sender = both
transfer_timeout = 720
clean_cmd = rm -f
filesize = 10
host_script = serial_host_send_receive.py
guest_script = VirtIoChannel_guest_send_receive.py
Windows:
driver_name = vioser
guest_script_folder = C:\
clean_cmd = del /f /q
tmp_dir = %TEMP%
python_bin = python2.7
qemu/tests/ioeventfd.py
浏览文件 @
90a43144
...
...
@@ -12,6 +12,7 @@ from virttest import utils_test
from
virttest
import
qemu_qtree
from
avocado.utils
import
process
from
provider.storage_benchmark
import
generate_instance
from
qemu.tests.virtio_serial_file_transfer
import
transfer_data
@
error_context
.
context_aware
...
...
@@ -41,14 +42,35 @@ def run(test, params, env):
2.6 Check the ioeventfd=on via /proc/$PID/fd/.
2.7 Compare the output of 'ls -l /proc/$PID/fd/', the fds with
"off" should be less than the one with "on".
Scenario 3:
3.1 Boot guest with ioeventfd=off and port attched to virtio_serial_pci.
3.2 Execute info qtree in QMP monitor, info qtree should show the
ioeventfd = false.
3.3 Check the ioeventfd=off via /proc/$PID/fd/.
3.4 Transfer data via the virtserialport.
3.5 Boot guest with ioeventfd=on attched to one virtio_serial_pci.
3.6 Execute info qtree in QMP monitor, info qtree should show the
ioeventfd = true.
3.7 Check the ioeventfd=on via /proc/$PID/fd/.
3.8 Compare the output of 'ls -l /proc/$PID/fd/', the fds with
"off" should be less than the one with "on".
3.9 Transfer data via the virtserialport.
:param test: QEMU test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
def
_set_ioeventfd_options
():
""" Set the ioeventfd options. """
if
params
[
'drive_format'
]
==
'virtio'
:
"""
Set the ioeventfd options.
:return: device id with parameter ioeventfd
"""
dev_type
=
params
.
get
(
"dev_type"
)
if
dev_type
==
"virtio_serial"
:
params
[
'virtio_serial_extra_params_vs1'
]
=
ioeventfd
dev_id
=
'virtio_serial_pci0'
elif
params
[
'drive_format'
]
==
'virtio'
:
params
[
'blk_extra_params_image1'
]
=
ioeventfd
dev_id
=
'image1'
elif
params
[
'drive_format'
]
==
'scsi-hd'
:
...
...
@@ -166,6 +188,11 @@ def run(test, params, env):
if
params
.
get
(
'reboot'
,
'no'
)
==
'yes'
:
error_context
.
context
(
'Reboot the guest.'
,
logging
.
info
)
session
=
_iozone_test
(
vm
.
reboot
(
session
,
timeout
=
timeout
))
if
params
.
get
(
'data_transfer'
,
'no'
)
==
'yes'
:
if
os_type
==
'windows'
:
session
=
utils_test
.
qemu
.
windrv_check_running_verifier
(
session
,
vm
,
test
,
params
[
"driver_name"
])
transfer_data
(
params
,
vm
)
session
.
close
()
vm
.
destroy
(
gracefully
=
True
)
if
params
.
get
(
'compare_fd'
,
'no'
)
==
'yes'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录