]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: GO Negotiation stopped after TX start
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 30 Dec 2015 22:06:06 +0000 (00:06 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 30 Dec 2015 22:06:06 +0000 (00:06 +0200)
This verifies that P2P_STOP_FIND stops a pending offchannel TX wait in
the kernel by checking that a listen operation can be started in less
than a second after stopping a pending Action frame TX. This verifies
that the optimization introduced in the previous commit works properly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_p2p_grpform.py

index bd42792b5dedef2731964c16fcff3ccf308da575..f13f0a3e2847358457c3f11409f80d8649f8c1a0 100644 (file)
@@ -1099,3 +1099,21 @@ def test_grpform_go_neg_dup_on_restart(dev):
 
     lower.dump_monitor()
     higher.dump_monitor()
+
+def test_grpform_go_neg_stopped(dev):
+    """GO Negotiation stopped after TX start"""
+    addr0 = dev[0].p2p_dev_addr()
+    dev[0].p2p_listen()
+    if not dev[1].discover_peer(addr0):
+        raise Exception("Could not discover peer")
+    dev[0].p2p_stop_find()
+    if "OK" not in dev[1].request("P2P_CONNECT %s pbc" % addr0):
+        raise Exception("Could not request GO Negotiation")
+    dev[1].p2p_stop_find()
+    dev[1].p2p_listen()
+    dev[0].p2p_find(social=True)
+    ev = dev[0].wait_global_event(["P2P-DEVICE-FOUND"], timeout=1.2)
+    dev[0].p2p_stop_find()
+    dev[1].p2p_stop_find()
+    if ev is None:
+        raise Exception("Did not find peer quickly enough after stopped P2P_CONNECT")