Parcourir la source

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>
Jouni Malinen il y a 12 ans
Parent
commit
8b2b687eb8
2 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 3 0
      tests/hwsim/start-p2p.sh
  2. 4 0
      tests/hwsim/stop-wifi.sh

+ 3 - 0
tests/hwsim/start-p2p.sh

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

+ 4 - 0
tests/hwsim/stop-wifi.sh

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