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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-01-31 18:06:06 +02:00
parent a1512a0cc7
commit 54f2cae2e6
5 changed files with 5 additions and 5 deletions

View file

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

View file

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

View file

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

View file

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

View file

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