[PATCH 13/17] tests: pmksa_cache: wait for STA on AP side before query

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

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

Before querying the PMKSA cache, wait for the STA to have
appeared on the AP side, otherwise scheduling differences
may have us asking when the STA thinks it's connected but
the AP hasn't fully processed that.

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 tests/hwsim/test_pmksa_cache.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py
index 65ef5d8162e8..17f478f1ce60 100644
--- a/tests/hwsim/test_pmksa_cache.py
+++ b/tests/hwsim/test_pmksa_cache.py
@@ -980,6 +980,7 @@ def test_pmksa_cache_ctrl(dev, apdev):
     pmksa_sta = dev[0].get_pmksa(bssid)
     if pmksa_sta is None:
         raise Exception("No PMKSA cache entry created on STA")
+    hapd.wait_sta()
     pmksa_ap = hapd.get_pmksa(addr)
     if pmksa_ap is None:
         raise Exception("No PMKSA cache entry created on AP")
@@ -1000,6 +1001,7 @@ def test_pmksa_cache_ctrl(dev, apdev):
     pmksa_sta2 = dev[0].get_pmksa(bssid)
     if pmksa_sta2 is None:
         raise Exception("No PMKSA cache entry created on STA after reconnect")
+    hapd.wait_sta()
     pmksa_ap2 = hapd.get_pmksa(addr)
     if pmksa_ap2 is None:
         raise Exception("No PMKSA cache entry created on AP after reconnect")
-- 
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