[PATCH 02/17] tests: ft/rrm: wait for STA before check_beacon_req()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

check_beacon_req() will request from hostapd to request a beacon
report from the STA, but that only works if it already knows about
the STA. Due to scheduling issues, it may not know even if wpa_s
reports it has successfully connected, so also wait for the STA to
show up in hostapd before check_beacon_req().

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 tests/hwsim/test_ap_ft.py | 3 +++
 tests/hwsim/test_rrm.py   | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py
index a2f1a4ead431..0e9d04775e56 100644
--- a/tests/hwsim/test_ap_ft.py
+++ b/tests/hwsim/test_ap_ft.py
@@ -3476,6 +3476,7 @@ def test_ap_ft_roam_rrm(dev, apdev):
     dev[0].flush_scan_cache()
     dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
                    scan_freq="2412")
+    hapd0.wait_sta()
     check_beacon_req(hapd0, addr, 1)
 
     params = ft_params2(ssid=ssid, passphrase=passphrase)
@@ -3485,10 +3486,12 @@ def test_ap_ft_roam_rrm(dev, apdev):
 
     dev[0].scan_for_bss(bssid1, freq=2412)
     dev[0].roam(bssid1)
+    hapd1.wait_sta()
     check_beacon_req(hapd1, addr, 2)
 
     dev[0].scan_for_bss(bssid0, freq=2412)
     dev[0].roam(bssid0)
+    hapd0.wait_sta()
     check_beacon_req(hapd0, addr, 3)
 
 def test_ap_ft_pmksa_caching(dev, apdev):
diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index a67554f0aebf..86cde92936b4 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -2193,18 +2193,22 @@ def test_rrm_reassociation(dev, apdev):
     addr = dev[0].own_addr()
     dev[0].flush_scan_cache()
     dev[0].connect("rrm", key_mgmt="NONE", scan_freq="2412")
+    hapd.wait_sta()
     check_beacon_req(hapd, addr, 1)
 
     dev[0].request("REASSOCIATE")
     dev[0].wait_connected()
+    hapd.wait_sta()
     check_beacon_req(hapd, addr, 1)
 
     hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
     bssid2 = hapd2.own_addr()
     dev[0].scan_for_bss(bssid2, freq=2412)
     dev[0].roam(bssid2)
+    hapd2.wait_sta()
     check_beacon_req(hapd2, addr, 2)
 
     dev[0].scan_for_bss(bssid, freq=2412)
     dev[0].roam(bssid)
+    hapd.wait_sta()
     check_beacon_req(hapd, addr, 3)
-- 
2.41.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux