]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Allow time for go_neg_pbc() GO Neg Resp to go out
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 23 Oct 2014 13:33:25 +0000 (16:33 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 23 Oct 2014 13:33:25 +0000 (16:33 +0300)
It was possible for the not-pre-authorized GO Negotiation case to end up
starting new GO Negotiation before the GO Negotiation Response frame
with status=1 was transmitted. While this works for group formation, it
could reduce test coverage for the common case where that response is
received. At a small sleep to make it less likely for this unexpected
sequence to happen during testing.

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

index 97c2f5c4f717029337b8950587416250da1dd264..36a9e826e844e0a8b851eb4d77484a4a0052d1d3 100644 (file)
@@ -123,6 +123,9 @@ def go_neg_pbc(i_dev, r_dev, i_intent=None, r_intent=None, i_freq=None, r_freq=N
     if ev is None:
         raise Exception("GO Negotiation timed out")
     r_dev.dump_monitor()
+    # Allow some time for the GO Neg Resp to go out before initializing new
+    # GO Negotiation.
+    time.sleep(0.2)
     logger.debug("Re-initiate GO Negotiation from r_dev")
     r_res = r_dev.p2p_go_neg_init(i_dev.p2p_dev_addr(), None, "pbc",
                                   go_intent=r_intent, timeout=20, freq=r_freq)