From d7273180c69c854df1e97d8a775f28e75019c6fa Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 12 Oct 2015 15:01:35 -0500 Subject: [PATCH] tests: Fix VM tests for Fedora Binaries aren't always in /usr/bin/, plus kvm is sometimes 'qemu-kvm'. Signed-off-by: Dan Williams --- tests/hwsim/vm/inside.sh | 2 ++ tests/hwsim/vm/vm-run.sh | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index ffab4eeb7..44a45fec1 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 99930437c..98af2a415 100755 --- a/tests/hwsim/vm/vm-run.sh +++ b/tests/hwsim/vm/vm-run.sh @@ -101,7 +101,15 @@ 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 + break + fi +done + +$KVM \ -kernel $KERNEL -smp 4 \ $KVMARGS -m $MEMORY -nographic \ -fsdev local,security_model=none,id=fsdev-root,path=/$ROTAG \