]> git.ipfire.org Git - thirdparty/hostap.git/blame - tests/hwsim/vm/vm-run.sh
P2P: Clear pending group formation data on group removal
[thirdparty/hostap.git] / tests / hwsim / vm / vm-run.sh
CommitLineData
970d3b09
JB
1#!/bin/bash
2
3cd "$(dirname $0)"
4
5if [ -z "$TESTDIR" ] ; then
6 TESTDIR=$(pwd)/../
7fi
8
9LOGS=/tmp/hwsim-test-logs/
10
11# increase the memory size if you want to run with valgrind, 512 MB works
12MEMORY=128
13
14# Some ubuntu systems (notably 12.04) have issues with this - since the guest
15# mounts as read-only it should be safe to not specify ,readonly. Override in
16# vm-config if needed (see below)
17ROTAG=,readonly
18
19# set this to ttyS0 to see kvm messages (if something doesn't work)
20KVMOUT=ttyS1
21
22# you can set EPATH if you need anything extra in $PATH inside the VM
23#EPATH=/some/dir
24
25test -f vm-config && . vm-config
26
27if [ -z "$KERNELDIR" ] ; then
28 echo "You need to set a KERNELDIR (in the environment or vm-config)"
29 exit 2
30fi
31KERNEL=$KERNELDIR/arch/x86_64/boot/bzImage
32
33
34CMD=$TESTDIR/vm/inside.sh
35LOGDIR=$LOGS/$(date +%s)
36mkdir -p $LOGDIR
37
38exec kvm \
39 -kernel $KERNEL -smp 4 \
40 -s -m $MEMORY -nographic \
41 -fsdev local,security_model=none,id=fsdev-root,path=/$ROTAG \
42 -device virtio-9p-pci,id=fs-root,fsdev=fsdev-root,mount_tag=/dev/root \
43 -fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \
44 -device virtio-9p-pci,id=fs-logs,fsdev=fsdev-logs,mount_tag=logshare \
45 -monitor null -serial stdio -serial file:$LOGDIR/console \
46 -append "mac80211_hwsim.radios=5 init=$CMD testdir=$TESTDIR console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$*"