aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-01-04 06:28:02 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-07 08:45:09 (GMT)
commit7c0d8645a18018a36c3bcdec53ba9c663324a1ae (patch)
tree2658055ff8b6d69da63bce7559e5a451dcf8f0e8
parent6470f471e4f6eca2a1a71f8fcf8e386ec12f7e6a (diff)
downloadhostap-7c0d8645a18018a36c3bcdec53ba9c663324a1ae.zip
hostap-7c0d8645a18018a36c3bcdec53ba9c663324a1ae.tar.gz
hostap-7c0d8645a18018a36c3bcdec53ba9c663324a1ae.tar.bz2
tests: Verify cfg80211 connect API with concurrent operation
Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_connect_cmd.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/hwsim/test_connect_cmd.py b/tests/hwsim/test_connect_cmd.py
index 5a359c0..75833a5 100644
--- a/tests/hwsim/test_connect_cmd.py
+++ b/tests/hwsim/test_connect_cmd.py
@@ -13,6 +13,9 @@ import time
import hwsim_utils
import hostapd
from wpasupplicant import WpaSupplicant
+from test_p2p_grpform import go_neg_pin_authorized
+from test_p2p_grpform import check_grpform_results
+from test_p2p_grpform import remove_group
def test_connect_cmd_open(dev, apdev):
"""Open connection using cfg80211 connect command"""
@@ -33,3 +36,23 @@ def test_connect_cmd_wpa2_psk(dev, apdev):
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
wpas.connect("sta-connect", psk="12345678", scan_freq="2412")
wpas.request("DISCONNECT")
+
+def test_connect_cmd_concurrent_grpform_while_connecting(dev, apdev):
+ """Concurrent P2P group formation while connecting to an AP using cfg80211 connect command"""
+ logger.info("Start connection to an infrastructure AP")
+ hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
+
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
+ wpas.connect("test-open", key_mgmt="NONE", wait_connect=False)
+
+ logger.info("Form a P2P group while connecting to an AP")
+ wpas.request("SET p2p_no_group_iface 0")
+
+ [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_freq=2412,
+ r_dev=wpas, r_freq=2412)
+ check_grpform_results(i_res, r_res)
+ remove_group(dev[0], wpas)
+
+ logger.info("Confirm AP connection after P2P group removal")
+ hwsim_utils.test_connectivity(wpas.ifname, apdev[0]['ifname'])