KVM Continous Integration setup

Source trees

Jenkins CI jobs

LAVA testing

Lava test definitions are documented on https://validation.linaro.org/static/docs/lava_test_shell.html.

The above mentioned linux-kvm job will call post-build-lava CI job that constructs a LAVA testing request. The bits that define the test are included in the ci/kvm-ci git repository listed earlier.

https://git.linaro.org/qa/test-definitions.git/blob/HEAD:/ubuntu/kvm.yaml

LAVA test definition. This essentially tells lava to run the next file:

https://git.linaro.org/qa/test-definitions.git/blob/HEAD:/common/scripts/kvm/test-kvm.sh

This is the script that starts KVM. It is independent of LAVA, so for development you can run it on any machine that is able to run QEMU with --enable-kvm. It downloads the guest image, kernel and dtb, and boots with kvm. It also copies inside kvm the

kvm-lava.conf

Is an upstart unit file run right after the boot of the guest vm. Inside the script ... end script block is the test code we want to run inside the kvm image right after boot. In this case this the minimal test case that show booting with kvm succeeded. From here KVM testing can be extended to run all the tests Virtualization team wants to run.

LAVA testing results

Note that to see results in LAVA, you need to login on http://validation.linaro.org first.

KVM test results are published at virtualization team bundle and for mustang in mustang KVM bundle.

The easiest way to subscribe to test results is with my filters:

Replicating tests locally (arndale)

Get the latest image: http://snapshots.linaro.org/ubuntu/images/kvm/latest/arndale-sd.img.gz

gunzip and dd on a sd card, instert to arndale and boot.

After booting, clone the test-definitions repo on the arndale for running the test scripts:

# git clone http://git.linaro.org/git/qa/test-definitions.git
# cd test-definitions
# ./common/scripts/kvm/test-kvm.sh

This should result identical commands run as what the lava test does.

To build the arndale host image or kvm guest image locally on a x86 PC, pull in the kernel tree and kvm-ci scripts:

git clone -b kvm-arm-next-arndale git://git.linaro.org/people/cdall/linux-kvm-arm.git linux
cd linux
git clone http://git.linaro.org/git/ci/kvm-ci.git

To build the host image (arndale-img.gz)

export hwpack=arndale
./kvm-ci/jenkins-run

and the guest image:

export arch=arm32
./kvm-ci/jenkins-guest-run

Core/Virtualization/Testing/KVM (last modified 2016-02-17 10:13:54)