From 4313e8ddfd25a1a1aefc239c2d8016e643674981 Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Fri, 13 Mar 2015 10:19:50 +0200 Subject: kvm bugfixes - use hwloc-nox since cpu order on big.LITTLE systems might differ. - fix accumulation of prefixes armv7l-aarch64-kvm-boot-1 [v2] - only upload arm64 logs if they exist Change-Id: Ic9cdd39262ffedc8c9a4674cc5ccc3b4e2d8627a Signed-off-by: Riku Voipio --- common/scripts/kvm/test-kvm.sh | 28 +++++++++++++++++++--------- ubuntu/kvm.yaml | 7 ++++--- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/common/scripts/kvm/test-kvm.sh b/common/scripts/kvm/test-kvm.sh index 09d1010..5d6f887 100755 --- a/common/scripts/kvm/test-kvm.sh +++ b/common/scripts/kvm/test-kvm.sh @@ -22,13 +22,12 @@ tamper_guest() { guest=$1 prefix=$2 - KVM_BOOT=${prefix}-$KVM_BOOT - KVM_GUEST_NET=${prefix}-$KVM_GUEST_NET + PREFIX_KVM_BOOT=${prefix}-$KVM_BOOT + PREFIX_KVM_GUEST_NET=${prefix}-$KVM_GUEST_NET if [ ! -r $guest ]; then - echo "$KVM_HOST_NET 0 pc skip" - echo "$KVM_BOOT 0 pc skip" - echo "$KVM_GUEST_NET 0 pc skip" + echo "$PREFIX_KVM_BOOT 0 pc skip" + echo "$PREFIX_KVM_GUEST_NET 0 pc skip" exit 0 fi @@ -52,8 +51,8 @@ tamper_guest() cat >> /mnt/usr/bin/test-guest.sh < /root/guest.log 2>&1 - echo "$KVM_BOOT 0 pc pass" - ping -w 20 -c 10 10.0.0.1 && echo "$KVM_GUEST_NET 0 pc pass" || echo "$KVM_GUEST_NET 0 pc fail" + echo "$PREFIX_KVM_BOOT 0 pc pass" + ping -w 20 -c 10 10.0.0.1 && echo "$PREFIX_KVM_GUEST_NET 0 pc pass" || echo "$PREFIX_KVM_GUEST_NET 0 pc fail" sh $TEST_SCRIPT EOF chmod a+x /mnt/usr/bin/test-guest.sh @@ -196,10 +195,21 @@ case ${ARCH} in -nographic -enable-kvm 2>&1|tee kvm-arm32.log ;; aarch64) + # handle big.LITTLE + hwloc-ls + case ${hwpack} in + juno) + # run on a57 cluster + bind="hwloc-bind socket:1" + ;; + *) + bind="" + ;; + esac deadline 60 qemu-system-aarch64 & qemu-system-aarch64 --version echo "64bit guest test" - taskset -c 0,1,2,3 qemu-system-aarch64 -smp 2 -m 1024 -cpu host -M virt \ + $bind qemu-system-aarch64 -smp 2 -m 1024 -cpu host -M virt \ -kernel ./Image-${hwpack} \ -append 'root=/dev/vda2 rw rootwait mem=1024M earlyprintk=pl011,0x9000000 console=ttyAMA0,38400n8' \ -drive if=none,id=image,file=kvm-arm64.qcow2 \ @@ -207,7 +217,7 @@ case ${ARCH} in -device virtio-blk-device,drive=image \ -nographic -enable-kvm 2>&1|tee kvm-arm64.log echo "32bit guest test" - taskset -c 4 qemu-system-aarch64 -m 1024 -cpu host,aarch64=off -M virt \ + $bind qemu-system-aarch64 -smp 2 -m 1024 -cpu host,aarch64=off -M virt \ -kernel ./zImage-vexpress \ -append 'root=/dev/vda2 rw rootwait mem=1024M console=ttyAMA0,38400n8' \ -drive if=none,id=image,file=kvm-arm32.qcow2 \ diff --git a/ubuntu/kvm.yaml b/ubuntu/kvm.yaml index ba41bbe..7464de9 100644 --- a/ubuntu/kvm.yaml +++ b/ubuntu/kvm.yaml @@ -25,16 +25,17 @@ install: - bridge-utils - udhcpc - wget + - hwloc-nox run: steps: - 'sudo ./common/scripts/kvm/test-host.sh' - 'sudo ./common/scripts/kvm/test-kvm.sh' - 'sudo ./common/scripts/kvm/test-rt-parse.sh' - - 'lava-test-run-attach kvm-arm64.log' - - 'lava-test-run-attach aarch64-guest.log' + - '[ -f kvm-arm64.log ] && lava-test-run-attach kvm-arm64.log' + - '[ -f aarch64-guest.log ] && lava-test-run-attach aarch64-guest.log' - 'lava-test-run-attach kvm-arm32.log' - - 'lava-test-run-attach armv7l-guest.log' + - 'lava-test-run-attach armv7l-guest.log' parse: pattern: '^(?P[^:]+):\s*(?P[0-9.]+)\s+(?P\w+)\s+(?P\w+)' -- cgit v1.2.3