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 <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2023-02-21 19:46:17 +02:00 committed by Jouni Malinen
parent 40c1396644
commit f710eba172

View file

@ -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