]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: P2P_PRESENCE_REQ on group interface
authorJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 11:16:05 +0000 (13:16 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 13:47:04 +0000 (15:47 +0200)
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>
tests/hwsim/test_p2p_autogo.py

index f45c78bb1a1da8aab83c76b6f033e1d58502f45e..6b0760f08543d47196045070e75f98148696047e 100644 (file)
@@ -465,3 +465,16 @@ def test_autogo_bridge(dev):
                          stderr=open('/dev/null', 'w'))
         subprocess.Popen(['sudo', 'brctl', 'delbr', 'p2p-br0'],
                          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()