From: Jouni Malinen Date: Sat, 2 Mar 2013 09:39:54 +0000 (+0200) Subject: tests: Add start/stop scripts and configuration files X-Git-Tag: aosp-kk-from-upstream~508 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=731e60f5c58b404bbedb4294aa37f7fbc652d500;p=thirdparty%2Fhostap.git tests: Add start/stop scripts and configuration files Signed-hostap: Jouni Malinen --- diff --git a/tests/hwsim/p2p0.conf b/tests/hwsim/p2p0.conf new file mode 100644 index 000000000..9482bdca4 --- /dev/null +++ b/tests/hwsim/p2p0.conf @@ -0,0 +1,3 @@ +ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin +device_name=Device A +p2p_no_group_iface=1 diff --git a/tests/hwsim/p2p1.conf b/tests/hwsim/p2p1.conf new file mode 100644 index 000000000..3622b1523 --- /dev/null +++ b/tests/hwsim/p2p1.conf @@ -0,0 +1,3 @@ +ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin +device_name=Device B +p2p_no_group_iface=1 diff --git a/tests/hwsim/p2p2.conf b/tests/hwsim/p2p2.conf new file mode 100644 index 000000000..eda52e13b --- /dev/null +++ b/tests/hwsim/p2p2.conf @@ -0,0 +1,3 @@ +ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin +device_name=Device C +p2p_no_group_iface=1 diff --git a/tests/hwsim/start-p2p.sh b/tests/hwsim/start-p2p.sh new file mode 100755 index 000000000..2000677ed --- /dev/null +++ b/tests/hwsim/start-p2p.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +DIR="$( cd "$( dirname "$0" )" && pwd )" +WPAS=$DIR/../../wpa_supplicant/wpa_supplicant + +$DIR/stop-wifi.sh +sudo modprobe mac80211_hwsim radios=3 +mkdir -p $DIR/logs +DATE=`date +%s` +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 & +sleep 1 diff --git a/tests/hwsim/stop-wifi.sh b/tests/hwsim/stop-wifi.sh new file mode 100755 index 000000000..d5d93ecfc --- /dev/null +++ b/tests/hwsim/stop-wifi.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +sudo killall -q hostapd +sudo killall -q wpa_supplicant +if grep -q mac80211_hwsim /proc/modules ; then + sudo rmmod mac80211_hwsim +fi