From 54f2cae2e68d6e6c4a4367ace8a7b7509ae554df Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 31 Jan 2015 18:06:06 +0200 Subject: [PATCH] tests: Make *_key_lifetime_in_memory more robust It was possible for the GTK-found-in-memory case to be triggered due to a retransmission of EAPOL-Key msg 3/4 especially when running test cases under heavy load (i.e., timeout on hostapd due to not receiving the 4/4 response quickly enough). Make this false failure report less likely by waiting a bit longer after the connection has been completed before fetching the process memory. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_eap.py | 2 +- tests/hwsim/test_ap_ft.py | 2 +- tests/hwsim/test_ap_psk.py | 2 +- tests/hwsim/test_erp.py | 2 +- tests/hwsim/test_sae.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index fa19f633d..d00ec04f8 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -2651,7 +2651,7 @@ 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") - time.sleep(0.1) + time.sleep(1) buf = read_process_memory(pid, password) dev[0].request("DISCONNECT") diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index 18e8dd6cb..19d77f9be 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -479,7 +479,7 @@ def test_ft_psk_key_lifetime_in_memory(dev, apdev, params): dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2", scan_freq="2412") - time.sleep(0.1) + time.sleep(1) buf = read_process_memory(pid, pmk) diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index dcf25ad46..e0c7c9694 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -912,7 +912,7 @@ def test_wpa2_psk_key_lifetime_in_memory(dev, apdev, params): get_key_locations(buf, pmk, "PMK") dev[0].connect_network(id, timeout=20) - time.sleep(0.1) + time.sleep(1) buf = read_process_memory(pid, pmk) diff --git a/tests/hwsim/test_erp.py b/tests/hwsim/test_erp.py index db0a7d7ce..0886444b7 100644 --- a/tests/hwsim/test_erp.py +++ b/tests/hwsim/test_erp.py @@ -241,7 +241,7 @@ def test_erp_key_lifetime_in_memory(dev, apdev, params): ca_cert="auth_serv/ca.pem", phase2="auth=PAP", erp="1", scan_freq="2412") - time.sleep(0.1) + time.sleep(1) buf = read_process_memory(pid, password) dev[0].request("DISCONNECT") diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index 93194d30e..dadf35ab5 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -208,7 +208,7 @@ def test_sae_key_lifetime_in_memory(dev, apdev, params): id = dev[0].connect("test-sae", psk=password, key_mgmt="SAE", scan_freq="2412") - time.sleep(0.1) + time.sleep(1) buf = read_process_memory(pid, password) dev[0].request("DISCONNECT")