From: Jouni Malinen Date: Sat, 31 Jan 2015 11:45:52 +0000 (+0200) Subject: tests: RSN pre-authentication OOM in wpa_supplicant X-Git-Tag: hostap_2_4~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db5f6b2ca3123beff63c487c28ff594061fdd71e;p=thirdparty%2Fhostap.git tests: RSN pre-authentication OOM in wpa_supplicant Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py index ae6c30c5b..45ca7a988 100644 --- a/tests/hwsim/test_pmksa_cache.py +++ b/tests/hwsim/test_pmksa_cache.py @@ -673,3 +673,20 @@ def _test_pmksa_cache_preauth_timeout(dev, apdev): raise Exception("No timeout event seen") if "timed out" not in ev: raise Exception("Unexpected event: " + ev) + +def test_pmksa_cache_preauth_wpas_oom(dev, apdev): + """RSN pre-authentication OOM in wpa_supplicant""" + params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap") + hostapd.add_ap(apdev[0]['ifname'], params) + eap_connect(dev[0], apdev[0], "PAX", "pax.user@example.com", + password_hex="0123456789abcdef0123456789abcdef", + bssid=apdev[0]['bssid']) + for i in range(1, 11): + with alloc_fail(dev[0], i, "rsn_preauth_init"): + res = dev[0].request("PREAUTH f2:11:22:33:44:55").strip() + logger.info("Iteration %d - PREAUTH command results: %s" % (i, res)) + for j in range(10): + state = dev[0].request('GET_ALLOC_FAIL') + if state.startswith('0:'): + break + time.sleep(0.05)