aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-01-01 18:01:00 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-01 18:01:00 (GMT)
commit474d209057fd4bd2ece801c3c515b6e01b83f9ad (patch)
tree3bdd81402448b429f71430602909cad74d32df0a
parent8fdcca345226fafe063304b831faeed45d0f21b2 (diff)
downloadhostap-474d209057fd4bd2ece801c3c515b6e01b83f9ad.zip
hostap-474d209057fd4bd2ece801c3c515b6e01b83f9ad.tar.gz
hostap-474d209057fd4bd2ece801c3c515b6e01b83f9ad.tar.bz2
tests: P2P SD using per-peer query
Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_p2p_service.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/hwsim/test_p2p_service.py b/tests/hwsim/test_p2p_service.py
index aa57c2c..8faefdc 100644
--- a/tests/hwsim/test_p2p_service.py
+++ b/tests/hwsim/test_p2p_service.py
@@ -62,21 +62,23 @@ def run_sd(dev, dst, query, exp_query=None, fragment=False):
def test_p2p_service_discovery(dev):
"""P2P service discovery"""
- ev = run_sd(dev, "00:00:00:00:00:00", "02000001")
- if "0b5f6166706f766572746370c00c000c01" not in ev:
- raise Exception("Unexpected service discovery response contents (Bonjour)")
- if "496e7465726e6574" not in ev:
- raise Exception("Unexpected service discovery response contents (UPnP)")
-
-def test_p2p_service_discovery_fragmentation(dev):
- """P2P service discovery with fragmentation"""
- ev = run_sd(dev, "00:00:00:00:00:00", "02000001", fragment=True)
- if not "long response" in ev:
+ 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:
raise Exception("Unexpected service discovery response contents (Bonjour)")
if "496e7465726e6574" not in ev:
raise Exception("Unexpected service discovery response contents (UPnP)")
+def test_p2p_service_discovery_fragmentation(dev):
+ """P2P service discovery with fragmentation"""
+ 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 "0b5f6166706f766572746370c00c000c01" not in ev:
+ raise Exception("Unexpected service discovery response contents (Bonjour)")
+ if "496e7465726e6574" not in ev:
+ raise Exception("Unexpected service discovery response contents (UPnP)")
+
def test_p2p_service_discovery_bonjour(dev):
"""P2P service discovery (Bonjour)"""
ev = run_sd(dev, "00:00:00:00:00:00", "02000101")