tests: Fix test_discovery to force full device discovery
P2P_PROV_DISC fails if the peer is not fully discovered and the previous version of the test cases did not force this (i.e., it could have started PD just based on having seen a Probe Request frame from the peer). Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
5924d4c105
commit
fde43cddb9
1 changed files with 2 additions and 11 deletions
|
@ -17,19 +17,10 @@ def test_discovery(dev):
|
||||||
addr1 = dev[1].p2p_dev_addr()
|
addr1 = dev[1].p2p_dev_addr()
|
||||||
logger.info("Start device discovery")
|
logger.info("Start device discovery")
|
||||||
dev[0].p2p_find(social=True)
|
dev[0].p2p_find(social=True)
|
||||||
dev[1].p2p_find(social=True)
|
if not dev[1].discover_peer(addr0):
|
||||||
ev0 = dev[0].wait_event(["P2P-DEVICE-FOUND"], timeout=15)
|
|
||||||
if ev0 is None:
|
|
||||||
raise Exception("Device discovery timed out")
|
raise Exception("Device discovery timed out")
|
||||||
ev1 = dev[1].wait_event(["P2P-DEVICE-FOUND"], timeout=15)
|
if not dev[0].discover_peer(addr1):
|
||||||
if ev1 is None:
|
|
||||||
raise Exception("Device discovery timed out")
|
raise Exception("Device discovery timed out")
|
||||||
dev[0].dump_monitor()
|
|
||||||
dev[1].dump_monitor()
|
|
||||||
if addr1 not in ev0:
|
|
||||||
raise Exception("Dev1 not found properly")
|
|
||||||
if addr0 not in ev1:
|
|
||||||
raise Exception("Dev0 not found properly")
|
|
||||||
|
|
||||||
logger.info("Test provision discovery for display")
|
logger.info("Test provision discovery for display")
|
||||||
dev[0].request("P2P_PROV_DISC " + addr1 + " display")
|
dev[0].request("P2P_PROV_DISC " + addr1 + " display")
|
||||||
|
|
Loading…
Reference in a new issue