This blog explains about how to setup avocado, avocado-vt framework to test KVM on IBM Power platform.


Introduction to Avocado Framework:


Avocado Test Framework, a python based opensource test framework is one of the best available open source test framework for Linux and especially it has enormous test scenarios for KVM Testing using its avocado-vt plugin and tests from tp-libvirt and tp-qemu.

It comprises of thousands of KVM test scenarios:

$avocado list -V --vt-type=libvirt
...
TEST TYPES SUMMARY
...
VT: 29912
$avocado list -V --vt-type=qemu
...

TEST TYPES SUMMARY
==================
...
VT: 4112

More details about the framework can be found on the respective hyperlinks to the framework github links.

Steps to setup avocado in host and run KVM tests:

Make sure your host has all packages installed which are needed to run KVM guests(VM) through libvirt.

Below tests results are from Fedora28 in IBM Power8 host.

System logged in as root user.

Installing avocado...
#git clone https://github.com/avocado-framework/avocado.git
#cd avocado
#make requirements
#python setup.py install

Installing avocado-vt...
#git clone https://github.com/avocado-framework/avocado-vt.git
#cd avocado-vt
#make requirements
#python setup.py install

Bootstrapping to get guest(VM) image, configs and tests...
#sudo avocado vt-bootstrap --vt-type qemu
------------> Say yes to download JeOS guest image

Running boot test a VM...
#avocado run boot --vt-type qemu --vt-guest-os JeOS.27.ppc64le
JOB ID     : d9952d2c1298683682c4f570561760a2a0f53e28
JOB LOG    : /home/sath/avocado-fvt-wrapper/results/job-2018-05-17T06.59-d9952d2/job.log
 (1/1) io-github-autotest-qemu.boot: PASS (38.99 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 44.45 s


Many more tests are available which can be browsed by `avocado list -V --vt-type=qemu`

In similar way tests can be run through libvirt also and it is more comfortable with help of my recent patches to avocado-vt framework, next blog will explain in details.


Hope this helps you in someways!
Thanks for taking time in reading this blog...