aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-10-25 18:26:23 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-25 18:46:39 (GMT)
commit42a4ba2865e5dd6ab151abea93474f4697dec7ab (patch)
treecc19119fe6c46f67781d3e60acd84936e3a8373c /tests
parent1f94e4ee3e82daf40a3caf9875d1099679f581df (diff)
downloadhostap-42a4ba2865e5dd6ab151abea93474f4697dec7ab.zip
hostap-42a4ba2865e5dd6ab151abea93474f4697dec7ab.tar.gz
hostap-42a4ba2865e5dd6ab151abea93474f4697dec7ab.tar.bz2
tests: Group formation wait for peer with driver increasing ROC duration
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_p2p_grpform.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/hwsim/test_p2p_grpform.py b/tests/hwsim/test_p2p_grpform.py
index 36a9e82..13b6e4c 100644
--- a/tests/hwsim/test_p2p_grpform.py
+++ b/tests/hwsim/test_p2p_grpform.py
@@ -769,3 +769,25 @@ def test_grpform_no_wsc_done(dev):
if ev is None:
raise Exception("Group formation timed out on P2P Client")
dev[0].remove_group()
+
+def test_grpform_wait_peer(dev):
+ """P2P group formation wait for peer to become ready"""
+ addr0 = dev[0].p2p_dev_addr()
+ addr1 = dev[1].p2p_dev_addr()
+ dev[1].p2p_listen()
+ if not dev[0].discover_peer(addr1):
+ raise Exception("Peer " + addr1 + " not found")
+ dev[0].request("SET extra_roc_dur 500")
+ if "OK" not in dev[0].request("P2P_CONNECT " + addr1 + " 12345670 display go_intent=15"):
+ raise Exception("Failed to initiate GO Neg")
+ time.sleep(3)
+ dev[1].request("P2P_CONNECT " + addr0 + " 12345670 enter go_intent=0")
+
+ ev = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=15)
+ if ev is None:
+ raise Exception("Group formation timed out")
+ dev[0].request("SET extra_roc_dur 0")
+ ev = dev[1].wait_global_event(["P2P-GROUP-STARTED"], timeout=15)
+ if ev is None:
+ raise Exception("Group formation timed out")
+ dev[0].remove_group()