tests: Fix progressive p2p_find to actually use progressive part
It turned out that the initial test case found the GO based on the initial full scan instead of the progressive search part. Fix this by started the GO only after the initial full scan. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
75ee44f2e6
commit
d7fb9e4819
1 changed files with 12 additions and 7 deletions
|
@ -213,17 +213,22 @@ def test_discovery_dev_id_go(dev):
|
|||
def test_discovery_social_plus_one(dev):
|
||||
"""P2P device discovery with social-plus-one"""
|
||||
logger.info("Start autonomous GO " + dev[0].ifname)
|
||||
dev[2].p2p_start_go(freq="2422")
|
||||
go = dev[2].p2p_dev_addr()
|
||||
dev[1].p2p_find(social=True)
|
||||
dev[0].p2p_find(progressive=True)
|
||||
ev = dev[0].wait_event(["P2P-DEVICE-FOUND"])
|
||||
logger.info("Wait for initial progressive find phases")
|
||||
dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"])
|
||||
dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"])
|
||||
go = dev[2].p2p_dev_addr()
|
||||
dev[2].p2p_start_go(freq="2422")
|
||||
logger.info("Verify whether the GO on non-social channel can be found")
|
||||
ev = dev[0].wait_global_event(["P2P-DEVICE-FOUND"], timeout=15)
|
||||
if ev is None:
|
||||
raise Exception("Peer not found")
|
||||
ev = dev[0].wait_event(["P2P-DEVICE-FOUND"])
|
||||
if ev is None:
|
||||
raise Exception("Peer not found")
|
||||
ev = dev[1].wait_event(["P2P-DEVICE-FOUND"])
|
||||
if go not in ev:
|
||||
ev = dev[0].wait_global_event(["P2P-DEVICE-FOUND"], timeout=15)
|
||||
if ev is None:
|
||||
raise Exception("Peer not found")
|
||||
ev = dev[1].wait_global_event(["P2P-DEVICE-FOUND"], timeout=15)
|
||||
if ev is None:
|
||||
raise Exception("Peer not found")
|
||||
dev[0].p2p_stop_find()
|
||||
|
|
Loading…
Reference in a new issue