diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2013-09-25 12:16:12 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2013-09-25 15:39:04 +0300 |
commit | e5d6c9cf7d02d8d72654ff2fcebb3575c8a4fd4c (patch) | |
tree | 0b4c675cdddfd5aee9a9f49072609095d39e4a6b | |
parent | 40c2586522b22cfd4e45f2c20e081ff5208ca0af (diff) |
kvm test for Ubuntu
based on ci/kvm-ci.git
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-rw-r--r-- | common/scripts/kvm/kvm-lava.conf | 10 | ||||
-rwxr-xr-x | common/scripts/kvm/test-host.sh | 4 | ||||
-rwxr-xr-x | common/scripts/kvm/test-kvm.sh | 27 | ||||
-rwxr-xr-x | common/scripts/kvm/test-rt-tests.sh | 32 | ||||
-rw-r--r-- | ubuntu/kvm.yaml | 17 |
5 files changed, 90 insertions, 0 deletions
diff --git a/common/scripts/kvm/kvm-lava.conf b/common/scripts/kvm/kvm-lava.conf new file mode 100644 index 0000000..a86f1ba --- /dev/null +++ b/common/scripts/kvm/kvm-lava.conf @@ -0,0 +1,10 @@ + +start on runlevel [23] +stop on runlevel [!23] +console output +script + echo "kvm-boot-1: pass" + echo "Test hackbench on guest" + sh /root/test-rt-tests.sh + poweroff +end script diff --git a/common/scripts/kvm/test-host.sh b/common/scripts/kvm/test-host.sh new file mode 100755 index 0000000..98a55bb --- /dev/null +++ b/common/scripts/kvm/test-host.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "Test hackbench on host" +sh ./common/scripts/kvm/test-rt-tests.sh diff --git a/common/scripts/kvm/test-kvm.sh b/common/scripts/kvm/test-kvm.sh new file mode 100755 index 0000000..b7691ae --- /dev/null +++ b/common/scripts/kvm/test-kvm.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +dmesg|grep 'Hyp mode initialized successfully' && echo kvm-init-1: pass || echo kvm-init-1: fail + +wget --no-check-certificate -nv https://snapshots.linaro.org/kernel-hwpack/linux-vexpress-kvm/linux-vexpress-kvm/kvm.qcow2.gz +gunzip kvm.qcow2.gz + +modprobe nbd max_part=16 +qemu-nbd -c /dev/nbd0 kvm.qcow2 +mount /dev/nbd0p2 /mnt/ + +cp /mnt/boot/vmlinuz-*-linaro-vexpress ./zImage +cp /mnt/lib/firmware/*-linaro-vexpress/device-tree/vexpress-v2p-ca15-tc1.dtb . +cp common/scripts/kvm/kvm-lava.conf /mnt/etc/init/kvm-lava.conf +cp /usr/bin/hackbench /mnt/usr/bin/hackbench +cp common/scripts/kvm/test-rt-tests.sh /mnt/root/test-rt-tests.sh +chmod 777 /mnt/root/test-rt-tests.sh +umount /mnt +sync +qemu-nbd -d /dev/nbd0 + +qemu-system-arm -smp 2 -m 1024 -cpu cortex-a15 -M vexpress-a15 -kernel ./zImage -dtb ./vexpress-v2p-ca15-tc1.dtb -append 'root=/dev/mmcblk0p2 rw rootwait mem=1024M console=ttyAMA0,38400n8' -drive if=sd,cache=writeback,file=kvm.qcow2 -redir tcp:5022::22 -nographic -enable-kvm 2>&1|tee kvm-log.txt + +if ! grep -q "kvm-boot-1:" kvm-log.txt +then + echo "kvm-boot-1: fail" +fi diff --git a/common/scripts/kvm/test-rt-tests.sh b/common/scripts/kvm/test-rt-tests.sh new file mode 100755 index 0000000..bee295d --- /dev/null +++ b/common/scripts/kvm/test-rt-tests.sh @@ -0,0 +1,32 @@ +/usr/bin/hackbench -l 100 -T +/usr/bin/hackbench -l 100 -P +/usr/bin/hackbench -l 10000 -T +/usr/bin/hackbench -l 10000 -P +/usr/bin/hackbench -l 100 -T -f 10 +/usr/bin/hackbench -l 100 -P -f 10 +/usr/bin/hackbench -l 10000 -T -f 10 +/usr/bin/hackbench -l 10000 -P -f 10 +/usr/bin/hackbench -s 64 -l 100 -T -f 10 +/usr/bin/hackbench -s 64 -l 100 -P -f 10 +/usr/bin/hackbench -s 64 -l 100 -T -f 20 +/usr/bin/hackbench -s 64 -l 100 -P -f 20 +/usr/bin/hackbench -s 64 -l 100 -T -f 30 +/usr/bin/hackbench -s 64 -l 100 -P -f 30 +/usr/bin/hackbench -s 64 -l 100 -T -f 40 +/usr/bin/hackbench -s 64 -l 100 -P -f 40 +/usr/bin/hackbench -s 1024 -l 100 -T -f 10 +/usr/bin/hackbench -s 1024 -l 100 -P -f 10 +/usr/bin/hackbench -s 1024 -l 100 -T -f 20 +/usr/bin/hackbench -s 1024 -l 100 -P -f 20 +/usr/bin/hackbench -s 1024 -l 100 -T -f 30 +/usr/bin/hackbench -s 1024 -l 100 -P -f 30 +/usr/bin/hackbench -s 1024 -l 100 -T -f 40 +/usr/bin/hackbench -s 1024 -l 100 -P -f 40 +/usr/bin/hackbench -s 4096 -l 100 -T -f 10 +/usr/bin/hackbench -s 4096 -l 100 -P -f 10 +/usr/bin/hackbench -s 4096 -l 100 -T -f 20 +/usr/bin/hackbench -s 4096 -l 100 -P -f 20 +/usr/bin/hackbench -s 4096 -l 100 -T -f 30 +/usr/bin/hackbench -s 4096 -l 100 -P -f 30 +/usr/bin/hackbench -s 4096 -l 100 -T -f 40 +/usr/bin/hackbench -s 4096 -l 100 -P -f 40 diff --git a/ubuntu/kvm.yaml b/ubuntu/kvm.yaml new file mode 100644 index 0000000..e11383b --- /dev/null +++ b/ubuntu/kvm.yaml @@ -0,0 +1,17 @@ +metadata: + name: kvm + format: "Lava-Test-Shell Test Definition 1.0" + description: "Test kvm on ubuntu." + +install: + deps: + - qemu-system + - rt-tests +run: + steps: + - 'sudo ./common/scripts/kvm/test-host.sh' + - 'sudo ./common/scripts/kvm/test-kvm.sh' + - "lava-test-run-attach kvm-log.txt text/plain" + +parse: + pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))" |