From: Jouni Malinen Date: Sat, 4 Jun 2016 19:01:33 +0000 (+0300) Subject: tests: Mesh network setup failing due to driver command failure X-Git-Tag: hostap_2_6~415 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=699074d30c13c6c0da880cb736c587f11f61a3f9;p=thirdparty%2Fhostap.git tests: Mesh network setup failing due to driver command failure Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index b43df8118..92650f3f0 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)