]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make ap_wpa2_eap_ttls_server_cert_hash_invalid more robust
authorJouni Malinen <j@w1.fi>
Wed, 14 May 2014 21:31:30 +0000 (00:31 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 15 May 2014 13:56:59 +0000 (16:56 +0300)
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 <j@w1.fi>
tests/hwsim/test_ap_eap.py

index 1d4860c94f53067af1774ffe9c20a82d460c0239..97ccf785cc4ea0228465d00d711841978501586f 100644 (file)
@@ -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"""