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 <j@w1.fi>
This commit is contained in:
parent
655bc8bfd6
commit
cbb85a0380
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
ev = dev[i].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Association and EAP start timed out")
|
raise Exception("Association and EAP start timed out")
|
||||||
timeout = 1 if i == 0 else 0.1
|
ev = dev[i].wait_event(["EAP: Failed to initialize EAP method: vendor 0 method 21 (TTLS)"], timeout=5)
|
||||||
ev = dev[i].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=timeout)
|
if ev is None:
|
||||||
if ev is not None:
|
raise Exception("Did not report EAP method initialization failure")
|
||||||
raise Exception("Unexpected EAP start")
|
|
||||||
|
|
||||||
def test_ap_wpa2_eap_pwd(dev, apdev):
|
def test_ap_wpa2_eap_pwd(dev, apdev):
|
||||||
"""WPA2-Enterprise connection using EAP-pwd"""
|
"""WPA2-Enterprise connection using EAP-pwd"""
|
||||||
|
|
Loading…
Reference in a new issue