From: Jouni Malinen Date: Fri, 15 Feb 2019 00:06:46 +0000 (+0200) Subject: tests: ap_wpa_ie_parsing to allow EAPOL-Key msg 2/4 rejection X-Git-Tag: hostap_2_8~366 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd12e58e5faa9013fadeef8aee9ea48f70211145;p=thirdparty%2Fhostap.git tests: ap_wpa_ie_parsing to allow EAPOL-Key msg 2/4 rejection Once mac80211 starts reporting the used Association Request frame IEs in the association event, wpa_supplicant will update RSN supplicant IE information based on that and that will make the AP reject EAPOL-Key msg 2/4 in this particular test scenario due to the hack of including two RSN IEs in the Association Request frame. Accept this sequence as a valid test execution in addition to the previously expected connection to avoid reporting incorrect failures. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 9af31e24a..5540f734a 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -2712,7 +2712,10 @@ def test_ap_wpa_ie_parsing(dev, apdev): if "OK" not in dev[0].request("VENDOR_ELEM_ADD 13 " + t): raise Exception("VENDOR_ELEM_ADD failed") dev[0].select_network(id) - dev[0].wait_connected() + ev = dev[0].wait_event(['CTRL-EVENT-CONNECTED', + 'WPA: 4-Way Handshake failed'], timeout=10) + if ev is None: + raise Exception("Association failed unexpectedly") dev[0].request("DISCONNECT") dev[0].dump_monitor() finally: