]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Add concurrent version of P2P test setup
authorJouni Malinen <j@w1.fi>
Tue, 19 Mar 2013 08:58:28 +0000 (10:58 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 19 Mar 2013 08:58:28 +0000 (10:58 +0200)
A virtual station interface in scanning state can change the P2P
operations quite a bit, so running all the P2P tests also in such
setup can increase testing coverage quite a bit.

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

tests/hwsim/sta-dummy.conf [new file with mode: 0644]
tests/hwsim/start-p2p-concurrent.sh [new file with mode: 0755]

diff --git a/tests/hwsim/sta-dummy.conf b/tests/hwsim/sta-dummy.conf
new file mode 100644 (file)
index 0000000..52b7205
--- /dev/null
@@ -0,0 +1,7 @@
+ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin
+
+network={
+       disabled=0
+       ssid="test"
+       key_mgmt=NONE
+}
diff --git a/tests/hwsim/start-p2p-concurrent.sh b/tests/hwsim/start-p2p-concurrent.sh
new file mode 100755 (executable)
index 0000000..969249d
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+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
+sudo iw wlan0 interface add sta0 type station
+sudo iw wlan1 interface add sta1 type station
+sudo iw wlan2 interface add sta2 type station
+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 -N -Dnl80211 -ista0 -c $DIR/sta-dummy.conf -ddKt > $DIR/logs/$DATE-log0 &
+sudo $WPAS -Dnl80211 -iwlan1 -c $DIR/p2p1.conf -N -Dnl80211 -ista1 -c $DIR/sta-dummy.conf -ddKt > $DIR/logs/$DATE-log1 &
+sudo $WPAS -Dnl80211 -iwlan2 -c $DIR/p2p2.conf -N -Dnl80211 -ista2 -c $DIR/sta-dummy.conf -ddKt > $DIR/logs/$DATE-log2 &
+sleep 1