提交 90a43144 编写于 作者: N nanliu

virtio_serial: test ioeventfd property with virtio_serial_pci

Signed-off-by: NNana Liu <nanliu@redhat.com>
上级 0d2cbcc5
- 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
......@@ -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.
先完成此消息的编辑!
想要评论请 注册