tests: P2P_LISTEN behavior with offchannel TX

This verifies that offchannel TX (PD in this specific case) does not
stop ongoing long P2P_LISTEN operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2014-12-18 15:42:21 +02:00 committed by Jouni Malinen
parent 49e1e9ca88
commit 7c5c1ba7b4

View file

@ -401,3 +401,25 @@ def test_p2p_peer_command(dev):
raise Exception("Invalid P2P_PEER command accepted")
if "FAIL" not in dev[0].request("P2P_PEER 00:11:22:33:44:55"):
raise Exception("P2P_PEER command for unknown peer accepted")
def test_p2p_listen_and_offchannel_tx(dev):
"""P2P_LISTEN behavior with offchannel TX"""
addr0 = dev[0].p2p_dev_addr()
addr1 = dev[1].p2p_dev_addr()
addr2 = dev[2].p2p_dev_addr()
dev[1].p2p_listen()
if not dev[0].discover_peer(addr1):
raise Exception("Device discovery timed out")
dev[0].p2p_listen()
dev[0].global_request("P2P_PROV_DISC " + addr1 + " display")
ev = dev[0].wait_event(["P2P-PROV-DISC-ENTER-PIN"], timeout=15)
if ev is None:
raise Exception("No PD result reported")
dev[1].p2p_stop_find()
if not dev[2].discover_peer(addr0):
raise Exception("Device discovery timed out after PD exchange")
dev[2].p2p_stop_find()
dev[0].p2p_stop_find()