]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make *_key_lifetime_in_memory more robust
authorJouni Malinen <j@w1.fi>
Sat, 31 Jan 2015 16:06:06 +0000 (18:06 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 31 Jan 2015 16:06:06 +0000 (18:06 +0200)
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>
tests/hwsim/test_ap_eap.py
tests/hwsim/test_ap_ft.py
tests/hwsim/test_ap_psk.py
tests/hwsim/test_erp.py
tests/hwsim/test_sae.py

index fa19f633dbfcbcfd935839586c3e20b4c61967c7..d00ec04f8275f0078f2a8669af2b0642e2fbe493 100644 (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")
index 18e8dd6cbc58da8b6d91c122f3d84565b594dc35..19d77f9be9a239d9cbda950aebfb253489eac84c 100644 (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)
 
index dcf25ad4687da41c54d030787a14786df2a1c798..e0c7c969434a6d6887cbb0c8ba5c8527bb6291ae 100644 (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)
 
index db0a7d7ce98ac8c97de10514a920d70e7c6ecbcb..0886444b760c131c355a659ec41af92e0253aba4 100644 (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")
index 93194d30ec46dfeb8bfcb0e51c53a6a26ef9179b..dadf35ab51873f0271b798293e19ca9730d7dfec 100644 (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")