aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-01-07 15:52:51 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-07 15:52:51 (GMT)
commit4062f697d8298b5dcbe734ea3e5154a95f3e1384 (patch)
tree3f003ca3bca91a4b408e2f00b301150c799baa6e /tests
parent4b2bc05377f401c7d2c8433b0405508f7893d72d (diff)
downloadhostap-4062f697d8298b5dcbe734ea3e5154a95f3e1384.zip
hostap-4062f697d8298b5dcbe734ea3e5154a95f3e1384.tar.gz
hostap-4062f697d8298b5dcbe734ea3e5154a95f3e1384.tar.bz2
tests: Radio measurement request - OOM while rejecting a request
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_rrm.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index 846046d..ea59dd4 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -1387,6 +1387,29 @@ def test_rrm_beacon_req_passive_scan_vht160(dev, apdev):
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].flush_scan_cache()
+def test_rrm_req_reject_oom(dev, apdev):
+ """Radio measurement request - OOM while rejecting a request"""
+ params = { "ssid": "rrm", "rrm_beacon_report": "1" }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+ bssid = hapd.own_addr()
+
+ dev[0].connect("rrm", key_mgmt="NONE", scan_freq="2412")
+ addr = dev[0].own_addr()
+
+ hdr = "d0003a01" + addr.replace(':', '') + 2*bssid.replace(':', '') + "1000"
+
+ hapd.set("ext_mgmt_frame_handling", "1")
+ dev[0].request("SET ext_mgmt_frame_handling 1")
+
+ with alloc_fail(dev[0], 1, "wpabuf_resize;wpas_rrm_handle_msr_req_element"):
+ # "RRM: Parallel measurements are not supported, reject"
+ if "OK" not in dev[0].request("MGMT_RX_PROCESS freq=2412 datarate=0 ssi_signal=-30 frame=" + hdr + "05000100002603010105"):
+ raise Exception("MGMT_RX_PROCESS failed")
+ wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
+ ev = hapd.wait_event(["MGMT-RX"], timeout=0.2)
+ if ev is not None:
+ raise Exception("Unexpected beacon report response during OOM")
+
def test_rrm_req_proto(dev, apdev):
"""Radio measurement request - protocol testing"""
params = { "ssid": "rrm", "rrm_beacon_report": "1" }