summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-09-05 21:30:45 +0300
committerJouni Malinen <j@w1.fi>2015-09-05 21:31:25 +0300
commit2fca1f67cf4bc118dc615a49585add40751ca4d1 (patch)
tree3016bd5f14076789855878b68a2cb96c2a8b6331
parent449d63d6b78c58ceac07a033067aa354c7cbec30 (diff)
downloadhostap-2fca1f67cf4bc118dc615a49585add40751ca4d1.tar.gz
tests: Secure mesh network setup failing due to wpa_init() OOM
This is a regression test for incorrect error path behavior that was fixed in the previous commits. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_wpas_mesh.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index f9b12139c..b6188d1bb 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -12,7 +12,7 @@ import subprocess
import hwsim_utils
from wpasupplicant import WpaSupplicant
-from utils import HwsimSkip
+from utils import HwsimSkip, alloc_fail
def check_mesh_support(dev, secure=False):
if "MESH" not in dev.get_capability("modes"):
@@ -599,3 +599,14 @@ def test_wpas_mesh_password_mismatch_retry(dev, apdev, params):
ev = dev[1].wait_event(["MESH-SAE-AUTH-BLOCKED"], timeout=10)
if ev is None:
raise Exception("dev1 did not report auth blocked")
+
+def test_mesh_wpa_auth_init_oom(dev, apdev):
+ """Secure mesh network setup failing due to wpa_init() OOM"""
+ check_mesh_support(dev[0], secure=True)
+ dev[0].request("SET sae_groups ")
+ with alloc_fail(dev[0], 1, "wpa_init"):
+ id = add_mesh_secure_net(dev[0])
+ dev[0].mesh_group_add(id)
+ ev = dev[0].wait_event(["MESH-GROUP-STARTED"], timeout=0.2)
+ if ev is not None:
+ raise Exception("Unexpected mesh group start during OOM")