]> git.ipfire.org Git - thirdparty/hostap.git/commit
tests: Wait for AP-STA-CONNECT before running connectivity test
authorJouni Malinen <j@w1.fi>
Sun, 4 Aug 2019 12:16:46 +0000 (15:16 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 4 Aug 2019 21:10:32 +0000 (00:10 +0300)
commit938c6e7b3d415909b91a448b964e0c3865979ed8
treea8b410aa336e7707d2a7eb269cfc8ea1c7fdf7f9
parent752e7a33e8d2767e541614be56a5b02cdcf25de6
tests: Wait for AP-STA-CONNECT before running connectivity test

When going through 4-way handshake, the station side reports
CTRL-EVENT-CONNECTED after having sent out EAPOL-Key msg 4/4. The AP
side reports AP-STA-CONNECT after having completed processing of this
frame. Especially when using UML with time travel, it is possible for
the connectivity test to be started before the AP side has configured
the pairwise TK if the test is triggered based on CTRL-EVENT-CONNECTED
instead of AP-STA-CONNECT.

Add explicit wait for AP-STA-CONNECT in some of these cases to reduce
likelihood of reporting failures for test cases that are actually
behaving as expected. This shows up with "dev1->dev2 unicast data
delivery failed" in the test log.

Do the same before requesting reauthentication from the station side
since that has a similar issue with the EAPOL-Start frame getting
encrypted before the AP is ready for it.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/hostapd.py
tests/hwsim/test_ap_ciphers.py
tests/hwsim/test_ap_eap.py
tests/hwsim/test_ap_ft.py
tests/hwsim/test_ap_psk.py
tests/hwsim/test_ap_roam.py
tests/hwsim/test_ap_vlan.py
tests/hwsim/test_pmksa_cache.py
tests/hwsim/test_rfkill.py
tests/hwsim/test_sta_dynamic.py