]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Start wlantest on hwsim0
authorJouni Malinen <j@w1.fi>
Sat, 9 Mar 2013 15:39:11 +0000 (17:39 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 9 Mar 2013 15:39:11 +0000 (17:39 +0200)
This is in preparation for using wlantest to verify correct behavior in
various test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>

tests/hwsim/start-p2p.sh
tests/hwsim/stop-wifi.sh

index 2000677ed7b463556ee1238280231e3d7b65a3ec..f91932fde5ece0c73409793583fe38b522f6e5e4 100755 (executable)
@@ -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 &
index d5d93ecfc86bec15cb13f21b4c8a5b1a8f25857b..8c56803da45b41e55c83aecb654715788638c0f7 100755 (executable)
@@ -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