From: Jouni Malinen Date: Tue, 21 Feb 2023 17:46:17 +0000 (+0200) Subject: tests: Make PASN checks for PTKSA_CACHE_LIST a bit more robust X-Git-Tag: hostap_2_11~1276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f710eba172b8ba7b6fb80cef701d088da240df25;p=thirdparty%2Fhostap.git tests: Make PASN checks for PTKSA_CACHE_LIST a bit more robust It was apparently possible for the test script to fetch the PTKSA_CACHE_LIST information from hostapd before the PASN message 3 had been processed since only the event from wpa_supplicant related to sending of that frame was explicitly waited for. Add a small wait to try to avoid this race condition with UML time-travel. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_pasn.py b/tests/hwsim/test_pasn.py index 2a095faa4..bff09841c 100644 --- a/tests/hwsim/test_pasn.py +++ b/tests/hwsim/test_pasn.py @@ -106,6 +106,11 @@ def check_pasn_akmp_cipher(dev, hapd, akmp="PASN", cipher="CCMP", if status: return + # There is a small window for a race condition here since the hostapd side + # might not yet have processed the PASN message 3 and added the PTKSA entry, + # so wait a bit before checking the results. + time.sleep(0.1) + check_pasn_ptk(dev, hapd, cipher, fail_ptk) @remote_compatible