tests: Make pmksa_cache_and_cui more robust

Make sure hostapd has had time to complete 4-way handshake processing
before initiating reauthentication from wpa_supplicant. There is a small
window for race condition here when testing with UML and time travel.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2023-02-10 13:11:54 +02:00 committed by Jouni Malinen
parent 2d3afc273d
commit eff82f93af

View file

@ -422,6 +422,7 @@ def test_pmksa_cache_and_cui(dev, apdev):
raise Exception("No PMKSA cache entry found")
if pmksa['pmkid'] != pmksa1b['pmkid']:
raise Exception("Unexpected PMKID change for AP1")
hapd.wait_sta()
dev[0].request("REAUTHENTICATE")
ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=10)