tests: P2P SD using per-peer query

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-01-01 20:01:00 +02:00
parent 8fdcca3452
commit 474d209057

View file

@ -62,7 +62,8 @@ def run_sd(dev, dst, query, exp_query=None, fragment=False):
def test_p2p_service_discovery(dev): def test_p2p_service_discovery(dev):
"""P2P service discovery""" """P2P service discovery"""
ev = run_sd(dev, "00:00:00:00:00:00", "02000001") for dst in [ "00:00:00:00:00:00", dev[0].p2p_dev_addr() ]:
ev = run_sd(dev, dst, "02000001")
if "0b5f6166706f766572746370c00c000c01" not in ev: if "0b5f6166706f766572746370c00c000c01" not in ev:
raise Exception("Unexpected service discovery response contents (Bonjour)") raise Exception("Unexpected service discovery response contents (Bonjour)")
if "496e7465726e6574" not in ev: if "496e7465726e6574" not in ev:
@ -70,7 +71,8 @@ def test_p2p_service_discovery(dev):
def test_p2p_service_discovery_fragmentation(dev): def test_p2p_service_discovery_fragmentation(dev):
"""P2P service discovery with fragmentation""" """P2P service discovery with fragmentation"""
ev = run_sd(dev, "00:00:00:00:00:00", "02000001", fragment=True) for dst in [ "00:00:00:00:00:00", dev[0].p2p_dev_addr() ]:
ev = run_sd(dev, dst, "02000001", fragment=True)
if not "long response" in ev: if not "long response" in ev:
if "0b5f6166706f766572746370c00c000c01" not in ev: if "0b5f6166706f766572746370c00c000c01" not in ev:
raise Exception("Unexpected service discovery response contents (Bonjour)") raise Exception("Unexpected service discovery response contents (Bonjour)")