aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-12-02 14:35:03 (GMT)
committerJouni Malinen <j@w1.fi>2019-12-02 14:35:03 (GMT)
commit2e58926ef306df2264d70c01a1c12fe192211975 (patch)
tree084d69379138fa029f78e3028b962215a16bb676
parent38203148e99b13e7c26cebe43404b976d8108b07 (diff)
downloadhostap-2e58926ef306df2264d70c01a1c12fe192211975.zip
hostap-2e58926ef306df2264d70c01a1c12fe192211975.tar.gz
hostap-2e58926ef306df2264d70c01a1c12fe192211975.tar.bz2
tests: hostapd global control interface and per-interface events
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_hapd_ctrl.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/hwsim/test_hapd_ctrl.py b/tests/hwsim/test_hapd_ctrl.py
index 245aad7..5b802e4 100644
--- a/tests/hwsim/test_hapd_ctrl.py
+++ b/tests/hwsim/test_hapd_ctrl.py
@@ -79,9 +79,20 @@ def run_hapd_ctrl_sta(dev, apdev):
passphrase = "12345678"
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
hapd = hostapd.add_ap(apdev[0], params)
+ hglobal = hostapd.HostapdGlobal(apdev[0])
dev[0].request("VENDOR_ELEM_ADD 13 2102ff02")
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
addr = dev[0].own_addr()
+ ev = hapd.wait_event(["AP-STA-CONNECTED"], timeout=2)
+ if ev is None:
+ raise Exception("No hostapd per-interface event reported")
+ ev2 = hglobal.wait_event(["AP-STA-CONNECTED"], timeout=2)
+ if ev2 is None:
+ raise Exception("No hostapd global event reported")
+ if not ev2.startswith("IFNAME=" + apdev[0]['ifname'] + " <"):
+ raise Exception("Unexpected global event prefix: " + ev2)
+ if ev not in ev2:
+ raise Exception("Event mismatch (%s,%s)" % (ev, ev2))
if "FAIL" in hapd.request("STA " + addr):
raise Exception("Unexpected STA failure")
if "FAIL" not in hapd.request("STA " + addr + " eapol"):