[PATCH] hwsim/test: fix VM tests for Fedora

Dan Williams dcbw
Mon Oct 12 13:01:35 PDT 2015


Binaries aren't always in /usr/bin/, plus kvm is sometimes
'qemu-kvm'.

Signed-off-by: Dan Williams <dcbw at redhat.com>
---

diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index ffab4ee..dd5ee3a 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -12,6 +12,8 @@ mount sysfs -t sysfs /sys
 # needed for tracing
 mount debugfs -t debugfs /sys/kernel/debug
 
+export PATH=/usr/sbin:$PATH
+
 # reboot on any sort of crash
 sysctl kernel.panic_on_oops=1
 sysctl kernel.panic=1
diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh
index 9993043..4a44f38 100755
--- a/tests/hwsim/vm/vm-run.sh
+++ b/tests/hwsim/vm/vm-run.sh
@@ -101,7 +101,14 @@ fi
 
 echo "Starting test run in a virtual machine"
 
-kvm \
+KVM=kvm
+for kvmprog in kvm qemu-kvm; do
+    if $kvmprog --version &> /dev/null; then
+        KVM=$kvmprog
+    fi
+done
+
+$KVM \
 	-kernel $KERNEL -smp 4 \
 	$KVMARGS -m $MEMORY -nographic \
 	-fsdev local,security_model=none,id=fsdev-root,path=/$ROTAG \




More information about the Hostap mailing list