From: Jouni Malinen Date: Thu, 20 Mar 2014 22:13:33 +0000 (+0200) Subject: tests: Verify Pre-authentication EAPOL status X-Git-Tag: hostap_2_2~513 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2a4005b3b823a74a8bfab398ebe9656d4b7d41f;p=thirdparty%2Fhostap.git tests: Verify Pre-authentication EAPOL status Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py index 8021c00bf..a20146533 100644 --- a/tests/hwsim/test_pmksa_cache.py +++ b/tests/hwsim/test_pmksa_cache.py @@ -250,7 +250,12 @@ def test_pmksa_cache_preauth(dev, apdev): bssid1 = apdev[1]['bssid'] dev[0].scan(freq="2412") success = False + status_seen = False for i in range(0, 50): + if not status_seen: + status = dev[0].request("STATUS") + if "Pre-authentication EAPOL state machines:" in status: + status_seen = True time.sleep(0.1) pmksa = dev[0].get_pmksa(bssid1) if pmksa: @@ -258,6 +263,8 @@ def test_pmksa_cache_preauth(dev, apdev): break if not success: raise Exception("No PMKSA cache entry created from pre-authentication") + if not status_seen: + raise Exception("Pre-authentication EAPOL status was not available") dev[0].scan(freq="2412") dev[0].request("ROAM " + bssid1)