]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make pmksa_cache_and_cui more robust
authorJouni Malinen <quic_jouni@quicinc.com>
Fri, 10 Feb 2023 11:11:54 +0000 (13:11 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 10 Feb 2023 11:11:54 +0000 (13:11 +0200)
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>
tests/hwsim/test_pmksa_cache.py

index 10d76a394f8d4b94460a1e09e6f8627133fece74..65ef5d8162e8ee38e43ef598fc3eb4380f7c544a 100644 (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)