Test Day:2010-04-08 Virtualization VirtioSerial

= VirtioSerial Testing= Test matrix: Guest (i386 & x86_64): Linux – RHEL6 Windows

virtio console ( virtio serial, vmchannel... ) a simple device for data input and out

Virtio architecture [1]:

front end : linux  : kernel >=  2.6.32-13.el6 windows : need driver backend : qemu-kvm >= 0.12.1.2-2.12.el6 Virtio-serial is just the transport protocol that will enable such applications to be written.It has two parts: (a) device emulation in qemu that presents a virtio-pci device to the guest and (b) a guest driver that presents a char device interface to userspace applications.

How it work : guest : install front end driver qemu cli : -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=4,bus=pci.0,addr=0x4 ^driver                            ~ device option -chardev pty,id=channel0 -device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0 ^driver                                                  ^ride on bus

check device information from QEMU command line : (QEMU) info qtree (QEMU) info pci check device information from guest : #lspci #/sys/class/virtio-ports/*/name To Be Test : Basic functional testing [3] - Amit's test suite from http://fedorapeople.org/gitweb?p=amitshah/public_git/test-virtserial.git - Spawn a virtioconsole, Work on the console - Spawn multiple virtioconsoles - Transfer files from the host to the guest (and vice-versa) over virtio-serial ports - Try all of the above at the same time - Try the above with different guest smp options

Survive basic guest operation - live migration - offline migration - guest reboot/shutdown/kdump - guest s3/s4

Dynamic add/remove - remove/load guest driver - add/remove device from qemu command device add and survive reboot device delete and survive reboot create MAX number of ports ( default max=31) add existed device remove unexisted device Performance - X MB/s

TBD : test window front driver with spice.

Test detail:(many of tests are covered by other testplan, so no need repeat here)

Steps of VirtioSerial/VMchannel Testing:

1. Execute Amit's test script 1.1 Get test program

$ git clone git://fedorapeople.org/home/fedora/amitshah/public_git/test-virtserial.git

1.2 Copy this program to guest, compile and put the auto-virtserial-guest program in /etc/init.d/ and put a line in /etc/rc.local to invoke it upon boot:

: /etc/init.d/auto-virtserial-guest &

1.3 Do prepare work for running the virtio console port test:

: Add a line saying 'hvc0'

: Copy tty1 to hvc0, replace all tty1 to hvc0 in the new file

To be able to test the udev symlinking rule,

mount -t debugfs debugfs /sys/kernel/debug

For the file checksumming test, place a (big) file in /tmp/amit/big-file on the host.

1.4 Compile, change run-sh.sh by your environment, and execute run-test.sh on host

$ ./run-test.sh

2 Hot-plug / Hot-unplug testing

2.1 Using the qemu monitor, hot-unplug port (qemu) device_add virtserialport,name=port.0,id=port0 2.2 Check vports in guest 2.3 Using the qemu monitor, hot-plug port (qemu) device_del port0 2.4 Check vports in guest