tests: Make P2PS tests less likely to fail in P2PS-PROV-DONE timeouts
The combination of starting P2P extended listen and issuing P2P_ASP_PROVISION_RESP almost immediately after that while in P2P_LISTEN state resulted in caes where the advertiser could end up going back to a long listen state while trying to retransmit PD Request. This resulted in p2ps_provision() timing out while waiting for P2PS-PROV-DONE especially in p2ps_feature_capability_* test cases. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
eabf083984
commit
85ceafd39a
1 changed files with 6 additions and 0 deletions
|
@ -190,6 +190,11 @@ def p2ps_provision(seeker, advertiser, adv_id, auto_accept=True, method="1000",
|
|||
raise Exception("Unknown peer " + addr0)
|
||||
pin = ev.split()[2]
|
||||
|
||||
# Stop P2P_LISTEN before issuing P2P_ASP_PROVISION_RESP to avoid
|
||||
# excessive delay and test case timeouts if it takes large number of
|
||||
# retries to find the peer awake on its Listen channel.
|
||||
advertiser.p2p_stop_find()
|
||||
|
||||
advertiser.asp_provision(peer, adv_id=advert_id, adv_mac=advert_mac,
|
||||
session_id=int(session, 0),
|
||||
session_mac=session_mac, status=12,
|
||||
|
@ -856,6 +861,7 @@ def test_p2ps_pd_follow_on_status_failure(dev):
|
|||
if ev is None:
|
||||
raise Exception("P2P-PROV-DISC-FAILURE timeout on seeker side")
|
||||
dev[1].p2p_ext_listen(500, 500)
|
||||
dev[0].p2p_stop_find()
|
||||
dev[0].asp_provision(addr1, adv_id=str(adv_id), adv_mac=addr0, session_id=1,
|
||||
session_mac=addr1, status=11, method=0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue