From a24d57995fc0decb682e5548dbf3faca270987c3 Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Wed, 11 Jun 2014 14:03:37 +0300 Subject: move to virtio block Switch to virtio block, since sd is emulated interface. While at it, improve installing and compiling hackbench. Avoid compiling in steps since we have scripts in place. Make sure we have gcc and others installed for compiling. Change-Id: I942e6bbafb09b7739156fb8d15f41c6334f16c8c Signed-off-by: Riku Voipio --- common/scripts/kvm/test-host.sh | 11 +++++++++++ common/scripts/kvm/test-kvm.sh | 5 +++-- ubuntu/kvm.yaml | 5 +---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/common/scripts/kvm/test-host.sh b/common/scripts/kvm/test-host.sh index 98a55bb..38556c3 100755 --- a/common/scripts/kvm/test-host.sh +++ b/common/scripts/kvm/test-host.sh @@ -1,4 +1,15 @@ #!/bin/sh +echo "Compile hackbench" +if hash curl 2>/dev/null; then + DOWNLOAD_FILE="curl -SOk" +else + DOWNLOAD_FILE="wget --progress=dot -e dotbytes=2M --no-check-certificate" +fi + +$DOWNLOAD_FILE http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c +gcc -g -Wall -O2 -o hackbench hackbench.c -lpthread +cp hackbench /usr/bin/ + 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 index de0d2a2..91eb2d9 100755 --- a/common/scripts/kvm/test-kvm.sh +++ b/common/scripts/kvm/test-kvm.sh @@ -85,10 +85,11 @@ ping -W 4 -c 10 192.168.1.10 && echo "$KVM_HOST_NET 0 pc pass" || echo "$KVM_HOS 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 \ + -append 'root=/dev/vda2 rw rootwait mem=1024M console=ttyAMA0,38400n8' \ + -drive if=none,id=image,file=kvm.qcow2 \ -netdev tap,id=tap0,script=no,downscript=no,ifname="tap0" \ -device virtio-net-device,netdev=tap0 \ + -device virtio-blk-device,drive=image \ -nographic -enable-kvm \ 2>&1|tee kvm-log.txt diff --git a/ubuntu/kvm.yaml b/ubuntu/kvm.yaml index 337492a..e867c72 100644 --- a/ubuntu/kvm.yaml +++ b/ubuntu/kvm.yaml @@ -22,10 +22,7 @@ install: - bridge-utils - udhcpc - wget - steps: - - 'wget http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c' - - 'gcc -g -Wall -O2 -o hackbench hackbench.c -lpthread' - - 'cp hackbench /usr/bin/' + - build-essential run: steps: -- cgit v1.2.3