]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - tests/hwsim/test_ap_eap.py
tests: Make key-lifetime-in-memory more robust for GTK check
[thirdparty/hostap.git] / tests / hwsim / test_ap_eap.py
index c4a794eb5761d0c947e58c470162fd11d656c466..e3ee3c78eda96b901763a0f0c994cd22ddae5c36 100644 (file)
@@ -3379,7 +3379,11 @@ def test_wpa2_eap_ttls_pap_key_lifetime_in_memory(dev, apdev, params):
     id = eap_connect(dev[0], apdev[0], "TTLS", "pap-secret",
                      anonymous_identity="ttls", password=password,
                      ca_cert="auth_serv/ca.pem", phase2="auth=PAP")
+    # The decrypted copy of GTK is freed only after the CTRL-EVENT-CONNECTED
+    # event has been delivered, so verify that wpa_supplicant has returned to
+    # eloop before reading process memory.
     time.sleep(1)
+    dev[0].ping()
     buf = read_process_memory(pid, password)
 
     dev[0].request("DISCONNECT")