aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-02-02 11:27:32 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-02 11:27:32 (GMT)
commitd4c2860b6be214eecb842ceb4830587b61c7cf4e (patch)
tree5c4741c7895bdfaa19caa5d6bdfe0f94a39ebcd1
parenta89faedc2255b2e0d1eae5093cd6e859bb39e1a2 (diff)
downloadhostap-d4c2860b6be214eecb842ceb4830587b61c7cf4e.zip
hostap-d4c2860b6be214eecb842ceb4830587b61c7cf4e.tar.gz
hostap-d4c2860b6be214eecb842ceb4830587b61c7cf4e.tar.bz2
tests: P2P persistent group re-invocation with peer having dropped info
This verifies that the persistent group information gets dropped based on peer response (unknown group) and that a new group formation can be completed after such invitation failure. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_p2p_persistent.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/hwsim/test_p2p_persistent.py b/tests/hwsim/test_p2p_persistent.py
index fdcb66f..362e443 100644
--- a/tests/hwsim/test_p2p_persistent.py
+++ b/tests/hwsim/test_p2p_persistent.py
@@ -594,3 +594,43 @@ def test_persistent_group_cancel_on_cli2(dev):
if "FAIL" not in dev[0].global_request("P2P_CANCEL"):
raise Exception("P2P_CANCEL succeeded unexpectedly on GO")
terminate_group(dev[0], dev[1])
+
+def test_persistent_group_peer_dropped(dev):
+ """P2P persistent group formation and re-invocation with peer having dropped group"""
+ form(dev[0], dev[1], reverse_init=True)
+ invite_from_cli(dev[0], dev[1])
+
+ logger.info("Remove group on the GO and try to invite from the client")
+ dev[0].request("REMOVE_NETWORK all")
+ invite(dev[1], dev[0])
+ ev = dev[1].wait_global_event(["P2P-INVITATION-RESULT"], timeout=10)
+ if ev is None:
+ raise Exception("No invitation result seen")
+ if "status=8" not in ev:
+ raise Exception("Unexpected invitation result: " + ev)
+ networks = dev[1].list_networks(p2p=True)
+ if len(networks) > 0:
+ raise Exception("Unexpected network block on client")
+
+ logger.info("Verify that a new group can be formed")
+ form(dev[0], dev[1], reverse_init=True)
+
+def test_persistent_group_peer_dropped2(dev):
+ """P2P persistent group formation and re-invocation with peer having dropped group (2)"""
+ form(dev[0], dev[1])
+ invite_from_go(dev[0], dev[1])
+
+ logger.info("Remove group on the client and try to invite from the GO")
+ dev[1].request("REMOVE_NETWORK all")
+ invite(dev[0], dev[1])
+ ev = dev[0].wait_global_event(["P2P-INVITATION-RESULT"], timeout=10)
+ if ev is None:
+ raise Exception("No invitation result seen")
+ if "status=8" not in ev:
+ raise Exception("Unexpected invitation result: " + ev)
+ networks = dev[1].list_networks(p2p=True)
+ if len(networks) > 0:
+ raise Exception("Unexpected network block on client")
+
+ logger.info("Verify that a new group can be formed")
+ form(dev[0], dev[1])