aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-05-30 17:17:10 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-30 18:10:58 (GMT)
commit582841689f1e348e65f2b2b00480cc58b3162cae (patch)
tree16b08120f3f5a90a645616eb7c039757f4a3a65a /tests
parentb4c738ec86a933c7fb967fbea9a6c87b10620a28 (diff)
downloadhostap-582841689f1e348e65f2b2b00480cc58b3162cae.zip
hostap-582841689f1e348e65f2b2b00480cc58b3162cae.tar.gz
hostap-582841689f1e348e65f2b2b00480cc58b3162cae.tar.bz2
tests: Secure mesh network setup local failure
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_wpas_mesh.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index 0ef2277..bc76bc7 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -12,7 +12,7 @@ import time
import hwsim_utils
from wpasupplicant import WpaSupplicant
-from utils import HwsimSkip, alloc_fail, wait_fail_trigger
+from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger
from tshark import run_tshark
def check_mesh_support(dev, secure=False):
@@ -707,6 +707,21 @@ def test_mesh_wpa_auth_init_oom(dev, apdev):
if ev is not None:
raise Exception("Unexpected mesh group start during OOM")
+def test_mesh_wpa_init_fail(dev, apdev):
+ """Secure mesh network setup local failure"""
+ check_mesh_support(dev[0], secure=True)
+ dev[0].request("SET sae_groups ")
+
+ with fail_test(dev[0], 1, "os_get_random;=__mesh_rsn_auth_init"):
+ id = add_mesh_secure_net(dev[0])
+ dev[0].mesh_group_add(id)
+ wait_fail_trigger(dev[0], "GET_FAIL")
+
+ with alloc_fail(dev[0], 1, "mesh_rsn_auth_init"):
+ id = add_mesh_secure_net(dev[0])
+ dev[0].mesh_group_add(id)
+ wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
+
def test_wpas_mesh_reconnect(dev, apdev):
"""Secure mesh network plink counting during reconnection"""
check_mesh_support(dev[0])