tests: pmksa_cache: Wait for STA on AP side before query
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@intel.com>
This commit is contained in:
parent
b99bb32f55
commit
b3e3e3b0d5
1 changed files with 2 additions and 0 deletions
|
@ -980,6 +980,7 @@ def test_pmksa_cache_ctrl(dev, apdev):
|
||||||
pmksa_sta = dev[0].get_pmksa(bssid)
|
pmksa_sta = dev[0].get_pmksa(bssid)
|
||||||
if pmksa_sta is None:
|
if pmksa_sta is None:
|
||||||
raise Exception("No PMKSA cache entry created on STA")
|
raise Exception("No PMKSA cache entry created on STA")
|
||||||
|
hapd.wait_sta()
|
||||||
pmksa_ap = hapd.get_pmksa(addr)
|
pmksa_ap = hapd.get_pmksa(addr)
|
||||||
if pmksa_ap is None:
|
if pmksa_ap is None:
|
||||||
raise Exception("No PMKSA cache entry created on AP")
|
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)
|
pmksa_sta2 = dev[0].get_pmksa(bssid)
|
||||||
if pmksa_sta2 is None:
|
if pmksa_sta2 is None:
|
||||||
raise Exception("No PMKSA cache entry created on STA after reconnect")
|
raise Exception("No PMKSA cache entry created on STA after reconnect")
|
||||||
|
hapd.wait_sta()
|
||||||
pmksa_ap2 = hapd.get_pmksa(addr)
|
pmksa_ap2 = hapd.get_pmksa(addr)
|
||||||
if pmksa_ap2 is None:
|
if pmksa_ap2 is None:
|
||||||
raise Exception("No PMKSA cache entry created on AP after reconnect")
|
raise Exception("No PMKSA cache entry created on AP after reconnect")
|
||||||
|
|
Loading…
Reference in a new issue