aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-01-29 18:52:30 (GMT)
committerJouni Malinen <j@w1.fi>2015-01-29 18:52:30 (GMT)
commit496a7a6ff97bd8a1d1de7d934f48f450c385c259 (patch)
treeb9b3276186bfb9c4a2a9ad26c2aa244875cfc5d6
parent2c528e9690457e35dfadcdcdc79f4ccda635ed32 (diff)
downloadhostap-496a7a6ff97bd8a1d1de7d934f48f450c385c259.zip
hostap-496a7a6ff97bd8a1d1de7d934f48f450c385c259.tar.gz
hostap-496a7a6ff97bd8a1d1de7d934f48f450c385c259.tar.bz2
tests: hostapd OOM loop targeting RADIUS accounting
The hostapd_oom_wpa2_eap test case did not always catch these code paths, so add a variant of that test case explicitly targeting RADIUS functions. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_hostapd_oom.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/hwsim/test_hostapd_oom.py b/tests/hwsim/test_hostapd_oom.py
index 8eec460..409f996 100644
--- a/tests/hwsim/test_hostapd_oom.py
+++ b/tests/hwsim/test_hostapd_oom.py
@@ -10,13 +10,13 @@ logger = logging.getLogger()
import hostapd
from utils import HwsimSkip
-def hostapd_oom_loop(apdev, params):
+def hostapd_oom_loop(apdev, params, start_func="main"):
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "ctrl" })
hapd_global = hostapd.HostapdGlobal()
count = 0
for i in range(1, 1000):
- if "OK" not in hapd.request("TEST_ALLOC_FAIL %d:main" % i):
+ if "OK" not in hapd.request("TEST_ALLOC_FAIL %d:%s" % (i, start_func)):
raise HwsimSkip("TEST_ALLOC_FAIL not supported")
try:
hostapd.add_ap(apdev[1]['ifname'], params)
@@ -53,3 +53,11 @@ def test_hostapd_oom_wpa2_eap(dev, apdev):
params['acct_server_port'] = "1813"
params['acct_server_shared_secret'] = "radius"
hostapd_oom_loop(apdev, params)
+
+def test_hostapd_oom_wpa2_eap_radius(dev, apdev):
+ """hostapd failing to setup WPA2-EAP mode due to OOM in RADIUS"""
+ params = hostapd.wpa2_eap_params(ssid="test")
+ params['acct_server_addr'] = "127.0.0.1"
+ params['acct_server_port'] = "1813"
+ params['acct_server_shared_secret'] = "radius"
+ hostapd_oom_loop(apdev, params, start_func="accounting_init")