]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: WDS STA interface events and STA command output
authorJouni Malinen <jouni@codeaurora.org>
Mon, 23 Apr 2018 17:38:40 +0000 (20:38 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 23 Apr 2018 21:35:47 +0000 (00:35 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_params.py

index 78278def2e1a914b7c876fbb9209d818d1311a67..b0ce0d1914c71f4c8f6bd086ce5fb4b34a7451eb 100644 (file)
@@ -244,6 +244,19 @@ def test_ap_wds_sta(dev, apdev):
         dev[0].cmd_execute(['ip', 'link', 'set', 'dev', 'wds-br0', 'up'])
         dev[0].cmd_execute(['iw', dev[0].ifname, 'set', '4addr', 'on'])
         dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
+        ev = hapd.wait_event(["WDS-STA-INTERFACE-ADDED"], timeout=10)
+        if ev is None:
+            raise Exception("No WDS-STA-INTERFACE-ADDED event seen")
+        if "sta_addr=" + dev[0].own_addr() not in ev:
+            raise Exception("No sta_addr match in " + ev)
+        if "ifname=" + hapd.ifname + ".sta" not in ev:
+            raise Exception("No ifname match in " + ev)
+        sta = hapd.get_sta(dev[0].own_addr())
+        if "wds_sta_ifname" not in sta:
+            raise Exception("Missing wds_sta_ifname in STA data")
+        if "ifname=" + sta['wds_sta_ifname'] not in ev:
+            raise Exception("wds_sta_ifname %s not in event: %s" %
+                            (sta['wds_sta_ifname'], ev))
         hwsim_utils.test_connectivity_iface(dev[0], hapd, "wds-br0",
                                             max_tries=15)
         dev[0].request("REATTACH")