From cbb85a03807abad1ea0419c7f9d83af6f8ce0a3c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 15 May 2014 00:31:30 +0300 Subject: [PATCH] tests: Make ap_wpa2_eap_ttls_server_cert_hash_invalid more robust Instead of checking for multiple EAP starts (which can occur if EAPOL-Start from supplicant goes out quickly enough, e.g., due to CPU load), look for the explicit message indicating that TTLS method initialization failed. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_eap.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 1d4860c94..97ccf785c 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -921,10 +921,9 @@ def test_ap_wpa2_eap_ttls_server_cert_hash_invalid(dev, apdev): ev = dev[i].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10) if ev is None: raise Exception("Association and EAP start timed out") - timeout = 1 if i == 0 else 0.1 - ev = dev[i].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=timeout) - if ev is not None: - raise Exception("Unexpected EAP start") + ev = dev[i].wait_event(["EAP: Failed to initialize EAP method: vendor 0 method 21 (TTLS)"], timeout=5) + if ev is None: + raise Exception("Did not report EAP method initialization failure") def test_ap_wpa2_eap_pwd(dev, apdev): """WPA2-Enterprise connection using EAP-pwd"""