]> git.ipfire.org Git - thirdparty/hostap.git/commit - tests/hwsim/test_ap_ft.py
tests: Make key-lifetime-in-memory more robust for GTK check
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 14 Dec 2015 15:23:47 +0000 (17:23 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 14 Dec 2015 15:23:47 +0000 (17:23 +0200)
commit8e416cecdba5c062b7ec9a6d3bf7c41e5c4962aa
treecc3030e73c90d3857e9efd4a7c2385407057c00c
parentf089cdf98eaf0071a54edfe6566648569745ccca
tests: Make key-lifetime-in-memory more robust for GTK check

The decrypted copy of a GTK from EAPOL-Key is cleared from memory only
after having sent out CTRL-EVENT-CONNECTED. As such, there was a race
condition on the test case reading the wpa_supplicant process memory
after the connection. This was unlikely to occur due to the one second
sleep, but even with that, it would be at least theorically possible to
hit this race under heavy load (e.g., when using large number of VMs to
run parallel testing). Avoid this by running a PING command to make sure
wpa_supplicant has returned to eloop before reading the process memory.
This should make it less likely to report false positives on GTK being
found in memory.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
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