aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-06-04 19:01:33 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-04 21:13:40 (GMT)
commit699074d30c13c6c0da880cb736c587f11f61a3f9 (patch)
treeb7570e60e3870c950a0370c500025b616a1ea23a /tests
parenta5a187b0f4aab0bf239b05121e8a9a8c6f506616 (diff)
downloadhostap-699074d30c13c6c0da880cb736c587f11f61a3f9.zip
hostap-699074d30c13c6c0da880cb736c587f11f61a3f9.tar.gz
hostap-699074d30c13c6c0da880cb736c587f11f61a3f9.tar.bz2
tests: Mesh network setup failing due to driver command failure
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_wpas_mesh.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index b43df81..92650f3 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -1116,6 +1116,29 @@ def test_mesh_scan_oom(dev):
if bss is not None:
raise Exception("Unexpected BSS result during OOM")
+def test_mesh_drv_fail(dev, apdev):
+ """Mesh network setup failing due to driver command failure"""
+ check_mesh_support(dev[0], secure=True)
+ dev[0].request("SET sae_groups ")
+
+ with fail_test(dev[0], 1, "nl80211_join_mesh"):
+ add_open_mesh_network(dev[0])
+ ev = dev[0].wait_event(["mesh join error"])
+ if ev is None:
+ raise Exception("Join failure not reported")
+
+ dev[0].dump_monitor()
+ with fail_test(dev[0], 1, "wpa_driver_nl80211_if_add"):
+ if "FAIL" not in dev[0].request("MESH_INTERFACE_ADD").strip():
+ raise Exception("Interface added unexpectedly")
+
+ dev[0].dump_monitor()
+ with fail_test(dev[0], 1, "wpa_driver_nl80211_init_mesh"):
+ add_open_mesh_network(dev[0])
+ ev = dev[0].wait_event(["Could not join mesh"])
+ if ev is None:
+ raise Exception("Join failure not reported")
+
def test_mesh_sae_groups_invalid(dev, apdev):
"""Mesh with invalid SAE group configuration"""
check_mesh_support(dev[0], secure=True)