aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-01-03 17:10:20 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-03 17:53:03 (GMT)
commit28b32e66d87b875871cdb1d223461771332b9cde (patch)
treec298d6a9e1336fdc3483199fc7455caad7e3e453 /tests
parent1edc31904a34645602c76e17fb6c9442b5d4e597 (diff)
downloadhostap-28b32e66d87b875871cdb1d223461771332b9cde.zip
hostap-28b32e66d87b875871cdb1d223461771332b9cde.tar.gz
hostap-28b32e66d87b875871cdb1d223461771332b9cde.tar.bz2
tests: Beacon request - passive scan mode and no matching BSS
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_rrm.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index bf05756..618bd0a 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -1206,6 +1206,46 @@ def test_rrm_beacon_req_passive(dev, apdev):
if report.opclass != 81 or report.channel != 11:
raise Exception("Incorrect opclass/channel for AP1")
+def test_rrm_beacon_req_passive_no_match(dev, apdev):
+ """Beacon request - passive scan mode and no matching BSS"""
+ params = { "ssid": "rrm", "rrm_beacon_report": "1" }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ dev[0].connect("rrm", key_mgmt="NONE", scan_freq="2412")
+ addr = dev[0].own_addr()
+
+ token = run_req_beacon(hapd, addr, "51010000640000021122334455")
+ ev = hapd.wait_event(["BEACON-RESP-RX"], timeout=10)
+ if ev is None:
+ raise Exception("Beacon report %d response not received" % i)
+ fields = ev.split(' ')
+ if len(fields[4]) > 0:
+ raise Exception("Unexpected beacon report BSS")
+
+def test_rrm_beacon_req_passive_no_match_oom(dev, apdev):
+ """Beacon request - passive scan mode and no matching BSS (OOM)"""
+ params = { "ssid": "rrm", "rrm_beacon_report": "1" }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ dev[0].connect("rrm", key_mgmt="NONE", scan_freq="2412")
+ addr = dev[0].own_addr()
+
+ with alloc_fail(dev[0], 1, "wpas_beacon_rep_no_results"):
+ token = run_req_beacon(hapd, addr, "51010000640000021122334455")
+ wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
+ ev = hapd.wait_event(["BEACON-RESP-RX"], timeout=0.2)
+ if ev is not None:
+ raise Exception("Unexpected Beacon report response during OOM")
+
+ # verify reporting is still functional
+ token = run_req_beacon(hapd, addr, "51010000640000021122334455")
+ ev = hapd.wait_event(["BEACON-RESP-RX"], timeout=10)
+ if ev is None:
+ raise Exception("Beacon report %d response not received" % i)
+ fields = ev.split(' ')
+ if len(fields[4]) > 0:
+ raise Exception("Unexpected beacon report BSS")
+
def test_rrm_beacon_req_active_duration_mandatory(dev, apdev):
"""Beacon request - Action scan and duration mandatory"""
params = { "ssid": "rrm", "rrm_beacon_report": "1" }