aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-12-08 11:26:50 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-08 12:06:58 (GMT)
commit647c0ed6799beda85c6192a6057db92dec32f69f (patch)
treef969d546a14f19eef0d8f5bc5c3c88d3b20e60d4 /tests
parentf40f8860d2415f3d1ccfe2d1105c0b26294430ba (diff)
downloadhostap-647c0ed6799beda85c6192a6057db92dec32f69f.zip
hostap-647c0ed6799beda85c6192a6057db92dec32f69f.tar.gz
hostap-647c0ed6799beda85c6192a6057db92dec32f69f.tar.bz2
tests: Fix ap_hs20_ft with PMF enabled
The Beacon loss event was not reported anymore, so remove that as an unnecessary step in the test case. In addition, check the key_mgmt values explicitly. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_hs20.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index a241a34..6ec7952 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -3795,6 +3795,9 @@ def test_ap_hs20_ft(dev, apdev):
interworking_select(dev[0], bssid, "home", freq="2412")
interworking_connect(dev[0], bssid, "TTLS")
dev[0].dump_monitor()
+ key_mgmt = dev[0].get_status_field("key_mgmt")
+ if key_mgmt != "FT-EAP":
+ raise Exception("Unexpected key_mgmt: " + key_mgmt)
# speed up testing by avoiding unnecessary scanning of other channels
nid = dev[0].get_status_field("id")
dev[0].set_network(nid, "scan_freq", "2412")
@@ -3803,16 +3806,15 @@ def test_ap_hs20_ft(dev, apdev):
hapd2 = hostapd.add_ap(apdev[1], params)
hapd.disable()
- ev = dev[0].wait_event(["CTRL-EVENT-BEACON-LOSS"], timeout=10)
- if ev is None:
- raise Exception("Beacon loss not reported")
- ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=5)
+ ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=10)
if ev is None:
raise Exception("Disconnection not reported")
ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=5)
if ev is None:
raise Exception("Connection to AP2 not reported")
- print dev[0].request("STATUS")
+ key_mgmt = dev[0].get_status_field("key_mgmt")
+ if key_mgmt != "WPA2/IEEE 802.1X/EAP":
+ raise Exception("Unexpected key_mgmt: " + key_mgmt)
def test_ap_hs20_remediation_sql(dev, apdev, params):
"""Hotspot 2.0 connection and remediation required using SQLite for user DB"""