提交 5759c3d1 编写于 作者: Y Yiqiao Pu

Merge pull request #270 from FengYang/virtio_serial

Add virtio serial file transfer basic test.
- virtio_serial_file_transfer:
type = virtio_serial_file_transfer
guest_scripts = VirtIoChannel_guest_send_receive.py;windows_support.py
guest_script_folder = /var/tmp/
file_transfer_serial_port = vc1
virtio_ports = vc1 vc2
virtio_port_type = serialport
file_sender = both
md5_check = yes
transfer_timeout = 720
clean_cmd = rm -f
filesize = 10
host_script = serial_host_send_receive.py
guest_script = VirtIoChannel_guest_send_receive.py
repeat_times = 1
Windows:
guest_script_folder = C:\
clean_cmd = del /f /q
from virttest import utils_test
def run(test, params, env):
"""
Test virtio serial guest file transfer.
Steps:
1) Boot up a VM with virtio serial device.
2) Create a large file in guest or host.
3) Copy this file between guest and host through virtio serial.
4) Check if file transfers ended good by md5 (optional).
:param test: QEMU test object.
:param params: Dictionary with the test parameters.
:param env: Dictionary with test environment.
"""
port_name = params.get("file_transfer_serial_port")
file_sender = params.get("file_sender", "guest")
md5_check = params.get("md5_check", "yes") == "yes"
utils_test.run_virtio_serial_file_transfer(test, params, env,
port_name=port_name,
sender=file_sender,
md5_check=md5_check)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册