tests: Mesh network setup failing due to driver command failure

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-06-04 22:01:33 +03:00
parent a5a187b0f4
commit 699074d30c

View file

@ -1116,6 +1116,29 @@ def test_mesh_scan_oom(dev):
if bss is not None: if bss is not None:
raise Exception("Unexpected BSS result during OOM") 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): def test_mesh_sae_groups_invalid(dev, apdev):
"""Mesh with invalid SAE group configuration""" """Mesh with invalid SAE group configuration"""
check_mesh_support(dev[0], secure=True) check_mesh_support(dev[0], secure=True)