From Fedora Project Wiki

(→‎VirtioSerial Testing: Remove udev rule -- included in F13 now.)
 
(3 intermediate revisions by 2 users not shown)
Line 69: Line 69:
test window front driver with spice.
test window front driver with spice.


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


Steps of VirtioSerial/VMchannel Testing:
Steps of VirtioSerial/VMchannel Testing:
Line 97: Line 97:
<guest>
<guest>
mount -t debugfs debugfs /sys/kernel/debug
mount -t debugfs debugfs /sys/kernel/debug
<guest /etc/udev/rules.d>:
create a new file 90-virtio-console.rules
and add the following text:
<guest /etc/udev/rules.d/90-virtio-console.rules>
KERNEL=="vcon*", SYMLINK+="virtio-console/$ATTR{name}"


For the file checksumming test, place a (big) file in
For the file checksumming test, place a (big) file in
Line 116: Line 108:
2  Hot-plug / Hot-unplug testing
2  Hot-plug / Hot-unplug testing


2.1 Using the qemu monitor, ports can be hot-plugged as well as unplugged:
2.1 Using the qemu monitor, hot-unplug port
(qemu) device_add virtserialport,name=port.0,id=port0  
(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  
(qemu) device_del port0  
2.2 Check vports in guest
2.4 Check vports in guest


</pre>
</pre>

Latest revision as of 13:01, 7 April 2010

VirtioSerial Testing[edit]

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:

<guest /etc/rc.local>:
/etc/init.d/auto-virtserial-guest &

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

<guest /etc/securetty>:
Add a line saying 'hvc0'

<guest /etc/event.d>:
Copy tty1 to hvc0, replace all tty1 to hvc0 in the new file

To be able to test the udev symlinking rule,

<guest>
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