hwsim tests: Allow setting KERNEL and KVMARGS
Rather than just having KERNELDIR, allow setting KERNEL directly. Also remove the -s option that prevents running multiple machines at the same time, but add a KVMARGS= variable that can be used to restore that if needed. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
c092d83e26
commit
1cd3eae362
1 changed files with 9 additions and 4 deletions
|
@ -22,13 +22,18 @@ KVMOUT=ttyS1
|
||||||
# you can set EPATH if you need anything extra in $PATH inside the VM
|
# you can set EPATH if you need anything extra in $PATH inside the VM
|
||||||
#EPATH=/some/dir
|
#EPATH=/some/dir
|
||||||
|
|
||||||
|
# extra KVM arguments, e.g., -s for gdbserver
|
||||||
|
#KVMARGS=-s
|
||||||
|
|
||||||
test -f vm-config && . vm-config
|
test -f vm-config && . vm-config
|
||||||
|
|
||||||
if [ -z "$KERNELDIR" ] ; then
|
if [ -z "$KERNEL" ] && [ -z "$KERNELDIR" ] ; then
|
||||||
echo "You need to set a KERNELDIR (in the environment or vm-config)"
|
echo "You need to set a KERNEL or KERNELDIR (in the environment or vm-config)"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
if [ -z "$KERNEL" ] ; then
|
||||||
KERNEL=$KERNELDIR/arch/x86_64/boot/bzImage
|
KERNEL=$KERNELDIR/arch/x86_64/boot/bzImage
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
CMD=$TESTDIR/vm/inside.sh
|
CMD=$TESTDIR/vm/inside.sh
|
||||||
|
@ -37,7 +42,7 @@ mkdir -p $LOGDIR
|
||||||
|
|
||||||
exec kvm \
|
exec kvm \
|
||||||
-kernel $KERNEL -smp 4 \
|
-kernel $KERNEL -smp 4 \
|
||||||
-s -m $MEMORY -nographic \
|
$KVMARGS -m $MEMORY -nographic \
|
||||||
-fsdev local,security_model=none,id=fsdev-root,path=/$ROTAG \
|
-fsdev local,security_model=none,id=fsdev-root,path=/$ROTAG \
|
||||||
-device virtio-9p-pci,id=fs-root,fsdev=fsdev-root,mount_tag=/dev/root \
|
-device virtio-9p-pci,id=fs-root,fsdev=fsdev-root,mount_tag=/dev/root \
|
||||||
-fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \
|
-fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \
|
||||||
|
|
Loading…
Reference in a new issue