tests: Fix VM tests for Fedora

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

Signed-off-by: Dan Williams <dcbw@redhat.com>
This commit is contained in:
Dan Williams 2015-10-12 15:01:35 -05:00 committed by Jouni Malinen
parent 78185978ed
commit d7273180c6
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -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 \