From eff82f93af3f5bbd7314a6af4955d73929b76e89 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 10 Feb 2023 13:11:54 +0200 Subject: [PATCH] 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 --- tests/hwsim/test_pmksa_cache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py index 10d76a394..65ef5d816 100644 --- a/tests/hwsim/test_pmksa_cache.py +++ b/tests/hwsim/test_pmksa_cache.py @@ -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)