summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2016-04-16 12:42:50 +0530
committerNaresh Kamboju <naresh.kamboju@linaro.org>2016-04-22 11:18:04 +0530
commitade709643672b24e007945b994bef2dddc58fe1b (patch)
tree38bc078064159e1401da417b6041913ad8c7a8fc
parent669526a49abe72621463fbb2d8783c1cc353854e (diff)
Linux: Add kvm tests
Linux manual kvm testing is added. Test installs pre-required packages for kvm. Downloads pre-built kvm images from Linaro snapshots server Installs pre-built kernel images on qemu boot partition Boots arm32 guest image on arm64 host device. Boots arm64 guest image on arm64 host device. To make tester's life easy i have created two test definitions - kvm-arm32-guest-on-arm64-host.yaml - kvm-arm64-guest-on-arm64-host.yaml These were tested on Hikey board. Ref: based on ci/kvm-ci.git https://git.linaro.org/qa/test-definitions.git/blob/refs/heads/master:/ubuntu/kvm.yaml Change-Id: I57da6dc131bd2a257a6f620d6e0464cb3f8cec85 Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rw-r--r--generic/linux/kvm-arm32-guest-on-arm64-host.yaml44
-rw-r--r--generic/linux/kvm-arm64-guest-on-arm64-host.yaml43
2 files changed, 87 insertions, 0 deletions
diff --git a/generic/linux/kvm-arm32-guest-on-arm64-host.yaml b/generic/linux/kvm-arm32-guest-on-arm64-host.yaml
new file mode 100644
index 0000000..1750034
--- /dev/null
+++ b/generic/linux/kvm-arm32-guest-on-arm64-host.yaml
@@ -0,0 +1,44 @@
+metadata:
+ name: kvm-arm32-guest-on-arm64-host
+ format: "Manual Test Definition 1.0"
+ description: "Test kvm running on arm32 bit guest on arm64 bit host"
+ maintainer:
+ - naresh.kamboju@linaro.org
+ os:
+ - ubuntu
+ - openembedded
+ scope:
+ - functional
+ devices:
+ - hi6220-hikey
+ environment:
+ - manual-test
+
+install:
+ deps:
+ - qemu-system
+ - wget
+ - xz-utils
+run:
+ steps:
+ - Boot arm64 bit board
+ - After boot success check for "ls /dev/kvm" kvm device entry
+ - If /dev/kvm not found, mark test case as not applicable and exit
+ - Else continue below steps for installation of required packages
+ - Run "sudo apt-get update"
+ - Run "sudo apt-get install qemu-system wget xz-utils"
+ - Download armv7 kernel Image from linaro snapshots
+ - Note: please double check latest in the below link it may be build number
+ - "wget http://snapshots.linaro.org/ubuntu/images/kvm/arndale/latest/zImage-armv7"
+ - Download arm minimal rootfs from linaro snapshots
+ - Note: please double check latest in the below link it may be build number
+ - "wget http://snapshots.linaro.org/ubuntu/images/kvm-guest/53/armhf/kvm-armhf.qcow2.xz"
+ - "xz -d kvm-armhf.qcow2.xz"
+ - Test arm32 guest Image on arm64 host
+ - Run "qemu-system-aarch64 -smp 2 -m 512 -cpu host,aarch64=off -M virt -kernel ./zImage-armv7 -append 'root=/dev/vda2 rw rootwait mem=512M console=ttyAMA0,38400n8' -device virtio-blk-device,drive=image -drive if=none,id=image,file=kvm-armhf.qcow2 -nographic -enable-kvm 2>&1 | tee kvm-arm32.log"
+ - Wait for couple of minutes let the qemu start booting guest kernel
+
+ expected:
+ - qemu should start booting the given guest kernel
+ - qeme guest kernel boot should be successful
+ - Run "uname -a" to check system information
diff --git a/generic/linux/kvm-arm64-guest-on-arm64-host.yaml b/generic/linux/kvm-arm64-guest-on-arm64-host.yaml
new file mode 100644
index 0000000..63626f2
--- /dev/null
+++ b/generic/linux/kvm-arm64-guest-on-arm64-host.yaml
@@ -0,0 +1,43 @@
+metadata:
+ name: kvm-arm64-guest-on-arm64-host
+ format: "Manual Test Definition 1.0"
+ description: "Test kvm running on arm64 bit guest on arm64 bit host"
+ maintainer:
+ - naresh.kamboju@linaro.org
+ os:
+ - ubuntu
+ - openembedded
+ scope:
+ - functional
+ devices:
+ - hi6220-hikey
+ environment:
+ - manual-test
+
+install:
+ deps:
+ - qemu-system
+ - wget
+ - xz-utils
+run:
+ steps:
+ - Boot arm64 bit board
+ - After boot success check for "ls /dev/kvm" kvm device entry
+ - If /dev/kvm not found, mark test case as not applicable and exit
+ - Else continue below steps for installation of required packages
+ - Run "sudo apt-get update"
+ - Run "sudo apt-get install qemu-system wget xz-utils"
+ - Use arm64 kernel Image from /boot
+ - "cp /boot/vmlinuz-`uname -r` Image"
+ - Download arm64 minimal rootfs from linaro snapshots
+ - Note: please double check latest in the below link it may be build number
+ - "wget http://snapshots.linaro.org/ubuntu/images/kvm-guest/latest/arm64/kvm-arm64.qcow2.xz"
+ - "xz -d kvm-arm64.qcow2.xz"
+ - Test arm64 guest Image on arm64 host
+ - Run "qemu-system-aarch64 -smp 2 -m 512 -cpu host -M virt -kernel Image -append 'root=/dev/vda2 rw rootwait mem=512M console=ttyAMA0,38400n8 earlycon=pl011,0x9000000' -device virtio-blk-device,drive=image -drive if=none,id=image,file=kvm-arm64.qcow2 -nographic -enable-kvm 2>&1 | tee tee kvm-arm64.log"
+ - Wait for couple of minutes let the qemu start booting guest kernel
+
+ expected:
+ - qemu should start booting the given guest kernel
+ - qeme guest kernel boot should be successful
+ - Run "uname -a" to check system information