From 8b2b687eb87b385202e62a2e460f64e50f778ce6 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 9 Mar 2013 17:39:11 +0200 Subject: [PATCH] tests: Start wlantest on hwsim0 This is in preparation for using wlantest to verify correct behavior in various test cases. Signed-hostap: Jouni Malinen --- tests/hwsim/start-p2p.sh | 3 +++ tests/hwsim/stop-wifi.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tests/hwsim/start-p2p.sh b/tests/hwsim/start-p2p.sh index 2000677ed..f91932fde 100755 --- a/tests/hwsim/start-p2p.sh +++ b/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 & diff --git a/tests/hwsim/stop-wifi.sh b/tests/hwsim/stop-wifi.sh index d5d93ecfc..8c56803da 100755 --- a/tests/hwsim/stop-wifi.sh +++ b/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