aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2018-11-25 10:02:07 (GMT)
committerJouni Malinen <j@w1.fi>2018-11-25 10:02:07 (GMT)
commite18b479299217379e4cba0ba46e3c83ce0e5d55d (patch)
treea12933eb2bc914d3155c28c101f9bdde2d85eec2
parenta21eadcf581103576d75315dda612588b302d034 (diff)
downloadhostap-e18b479299217379e4cba0ba46e3c83ce0e5d55d.zip
hostap-e18b479299217379e4cba0ba46e3c83ce0e5d55d.tar.gz
hostap-e18b479299217379e4cba0ba46e3c83ce0e5d55d.tar.bz2
tests: More coverage for ATTACH command parameter setting
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_scan.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py
index 35e78e0..c390f56 100644
--- a/tests/hwsim/test_scan.py
+++ b/tests/hwsim/test_scan.py
@@ -1474,3 +1474,16 @@ def test_scan_probe_req_events(dev, apdev):
ev = hapd.wait_event(["RX-PROBE-REQUEST"], timeout=0.1)
if ev is not None:
raise Exception("Unexpected RX-PROBE-REQUEST")
+
+ if "OK" not in hapd2.mon.request("ATTACH probe_rx_events=0"):
+ raise Exception("Failed to update event registration")
+
+ dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)
+ ev = hapd2.wait_event(["RX-PROBE-REQUEST"], timeout=0.5)
+ if ev is not None:
+ raise Exception("Unexpected RX-PROBE-REQUEST")
+
+ tests = [ "probe_rx_events", "probe_rx_events=-1", "probe_rx_events=2" ]
+ for val in tests:
+ if "FAIL" not in hapd2.mon.request("ATTACH " + val):
+ raise Exception("Invalid ATTACH command accepted")