tests: Start wlantest on hwsim0

This is in preparation for using wlantest to verify correct behavior in
various test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-03-09 17:39:11 +02:00
parent f3f8ee882f
commit 8b2b687eb8
2 changed files with 7 additions and 0 deletions

View file

@ -2,11 +2,14 @@
DIR="$( cd "$( dirname "$0" )" && pwd )"
WPAS=$DIR/../../wpa_supplicant/wpa_supplicant
WLANTEST=$DIR/../../wlantest/wlantest
$DIR/stop-wifi.sh
sudo modprobe mac80211_hwsim radios=3
mkdir -p $DIR/logs
DATE=`date +%s`
sudo ifconfig hwsim0 up
sudo $WLANTEST -i hwsim0 -c -d > $DIR/logs/$DATE-hwsim0 &
sudo $WPAS -Dnl80211 -iwlan0 -c $DIR/p2p0.conf -ddKt > $DIR/logs/$DATE-log0 &
sudo $WPAS -Dnl80211 -iwlan1 -c $DIR/p2p1.conf -ddKt > $DIR/logs/$DATE-log1 &
sudo $WPAS -Dnl80211 -iwlan2 -c $DIR/p2p2.conf -ddKt > $DIR/logs/$DATE-log2 &

View file

@ -2,6 +2,10 @@
sudo killall -q hostapd
sudo killall -q wpa_supplicant
sudo killall -q wlantest
if grep -q hwsim0 /proc/net/dev; then
sudo ifconfig hwsim0 down
fi
if grep -q mac80211_hwsim /proc/modules ; then
sudo rmmod mac80211_hwsim
fi