aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-01-07 15:46:18 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-07 15:46:18 (GMT)
commit2f7b4bb5784cff8ba86bf280d8b7c2db25a5a0ae (patch)
tree69bb6e04901a518c6a2dcc5d234e2de0b42b7c45 /tests
parent073167de7b81f7efdb8b8d6527c4b8729db1da47 (diff)
downloadhostap-2f7b4bb5784cff8ba86bf280d8b7c2db25a5a0ae.zip
hostap-2f7b4bb5784cff8ba86bf280d8b7c2db25a5a0ae.tar.gz
hostap-2f7b4bb5784cff8ba86bf280d8b7c2db25a5a0ae.tar.bz2
tests: Beacon request - active scan mode os_get_random failure
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_rrm.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index d1a7e95..b0199d5 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -1179,6 +1179,22 @@ def test_rrm_beacon_req_active_zero_duration(dev, apdev):
if ev is not None:
raise Exception("Unexpected Beacon report")
+def test_rrm_beacon_req_active_fail_random(dev, apdev):
+ """Beacon request - active scan mode os_get_random failure"""
+ 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 fail_test(dev[0], 1, "os_get_random;wpas_rm_handle_beacon_req"):
+ token = run_req_beacon(hapd, addr, "51000000640001ffffffffffff")
+ ev = hapd.wait_event(["BEACON-RESP-RX"], timeout=10)
+ if ev is None:
+ raise Exception("Beacon report response not received")
+ fields = ev.split(' ')
+ report = BeaconReport(binascii.unhexlify(fields[4]))
+ logger.info("Received beacon report: " + str(report))
+
def test_rrm_beacon_req_passive(dev, apdev):
"""Beacon request - passive scan mode"""
params = { "ssid": "rrm", "rrm_beacon_report": "1" }