tests: P2P_PRESENCE_REQ on group interface

This ends up using the special offchannel.c code path where a different
interface is selected for TX. In addition, the P2P-PRESENCE-RESPONSE
event is verified to be delivered on the group interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-12-14 13:16:05 +02:00
parent 8e3afd7f6c
commit 777bbe7a3c

View file

@ -465,3 +465,16 @@ def test_autogo_bridge(dev):
stderr=open('/dev/null', 'w')) stderr=open('/dev/null', 'w'))
subprocess.Popen(['sudo', 'brctl', 'delbr', 'p2p-br0'], subprocess.Popen(['sudo', 'brctl', 'delbr', 'p2p-br0'],
stderr=open('/dev/null', 'w')) stderr=open('/dev/null', 'w'))
def test_presence_req_on_group_interface(dev):
"""P2P_PRESENCE_REQ on group interface"""
dev[1].request("SET p2p_no_group_iface 0")
res = autogo(dev[0], freq=2437)
res = connect_cli(dev[0], dev[1], social=True, freq=2437)
if "FAIL" in dev[1].group_request("P2P_PRESENCE_REQ 30000 102400"):
raise Exception("Could not send presence request")
ev = dev[1].wait_group_event(["P2P-PRESENCE-RESPONSE"])
if ev is None:
raise Exception("Timeout while waiting for Presence Response")
dev[0].remove_group()
dev[1].wait_go_ending_session()