From 85774b70a1967ef27f921e2126e7e599ac2e8762 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 1 Jul 2015 00:42:09 +0300 Subject: [PATCH] tests: EAP server and OOM Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_eap.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 628a54636..949ebce47 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -3317,3 +3317,18 @@ def test_ap_wpa2_eap_tls_macacl(dev, apdev): eap_connect(dev[1], apdev[0], "TLS", "tls user", ca_cert="auth_serv/ca.pem", client_cert="auth_serv/user.pem", private_key="auth_serv/user.key") + +def test_ap_wpa2_eap_oom(dev, apdev): + """EAP server and OOM""" + params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap") + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412) + + with alloc_fail(hapd, 1, "eapol_auth_alloc"): + # The first attempt fails, but STA will send EAPOL-Start to retry and + # that succeeds. + dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TLS", + identity="tls user", ca_cert="auth_serv/ca.pem", + client_cert="auth_serv/user.pem", + private_key="auth_serv/user.key", + scan_freq="2412")