aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-05-26 09:31:16 (GMT)
committerJouni Malinen <j@w1.fi>2020-05-26 09:31:16 (GMT)
commit9818fbe9bc00d97657c7e039f51c682c5f256673 (patch)
tree146189e2d815180f68cb8084ff7bf8cd03d9bf1d
parent88436baaac4172fda2abbe41449ff0bf8994ee9d (diff)
downloadhostap-9818fbe9bc00d97657c7e039f51c682c5f256673.zip
hostap-9818fbe9bc00d97657c7e039f51c682c5f256673.tar.gz
hostap-9818fbe9bc00d97657c7e039f51c682c5f256673.tar.bz2
tests: Enforce proper OCV behavior for SA Query Response from STA
Now that there is a pending mac80211 patch ("mac80211: allow SA-QUERY processing in userspace") to allow wpa_supplicant to take care of SA Query Request processing, start enforcing correct behavior for this in ocv_sa_query and wpa2_ocv_sta_override_sa_query_resp. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_ap_pmf.py4
-rw-r--r--tests/hwsim/test_ocv.py8
2 files changed, 4 insertions, 8 deletions
diff --git a/tests/hwsim/test_ap_pmf.py b/tests/hwsim/test_ap_pmf.py
index 54f04f3..2bb4a36 100644
--- a/tests/hwsim/test_ap_pmf.py
+++ b/tests/hwsim/test_ap_pmf.py
@@ -90,7 +90,9 @@ def test_ocv_sa_query(dev, apdev):
# Test that client can handle SA Query with OCI element
if "OK" not in hapd.request("SA_QUERY " + dev[0].own_addr()):
raise Exception("SA_QUERY failed")
- time.sleep(0.1)
+ ev = hapd.wait_event(["OCV-FAILURE"], timeout=0.1)
+ if ev:
+ raise Exception("Unexpected OCV failure reported")
if wt.get_sta_counter("valid_saqueryresp_tx", apdev[0]['bssid'],
dev[0].own_addr()) < 1:
raise Exception("STA did not reply to SA Query")
diff --git a/tests/hwsim/test_ocv.py b/tests/hwsim/test_ocv.py
index 80bdd7a..1f185d7 100644
--- a/tests/hwsim/test_ocv.py
+++ b/tests/hwsim/test_ocv.py
@@ -985,10 +985,4 @@ def test_wpa2_ocv_sta_override_sa_query_resp(dev, apdev):
if "frame=saqueryresp" not in ev:
raise Exception("Unexpected OCV failure frame: " + ev)
if "error=primary channel mismatch" not in ev:
- if "error=did not receive mandatory OCI" in ev:
- # This is not correct, but do not report this as test failure for
- # now since the issue seems to be in mac80211 not allowing
- # wpa_supplicant to process the SA Query Request frame.
- logger.info("Unexpected OCV failure error: " + ev)
- else:
- raise Exception("Unexpected OCV failure error: " + ev)
+ raise Exception("Unexpected OCV failure error: " + ev)