From fbb79f94ebce752fd34f79ba9479629968f4bf1c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 23 Oct 2014 16:33:25 +0300 Subject: [PATCH] tests: Allow time for go_neg_pbc() GO Neg Resp to go out 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 --- tests/hwsim/test_p2p_grpform.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/hwsim/test_p2p_grpform.py b/tests/hwsim/test_p2p_grpform.py index 97c2f5c4f..36a9e826e 100644 --- a/tests/hwsim/test_p2p_grpform.py +++ b/tests/hwsim/test_p2p_grpform.py @@ -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)