From: Jouni Malinen Date: Mon, 30 May 2016 17:03:32 +0000 (+0300) Subject: tests: wpa_supplicant mesh scan results and OOM X-Git-Tag: hostap_2_6~435 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d4cdc3bb2f97238519a5737bb7e313115f3c8a7;p=thirdparty%2Fhostap.git tests: wpa_supplicant mesh scan results and OOM Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 17668e740..0ef22776b 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -980,3 +980,28 @@ def test_mesh_add_interface_oom(dev): finally: if mesh and mesh != "FAIL": dev[0].request("MESH_GROUP_REMOVE " + mesh) + +def test_mesh_scan_oom(dev): + """wpa_supplicant mesh scan results and OOM""" + check_mesh_support(dev[0]) + add_open_mesh_network(dev[0]) + check_mesh_group_added(dev[0]) + for i in range(5): + dev[1].scan(freq="2412") + res = dev[1].request("SCAN_RESULTS") + if "[MESH]" in res: + break + for r in res.splitlines(): + if "[MESH]" in r: + break + bssid = r.split('\t')[0] + + bss = dev[1].get_bss(bssid) + if bss is None: + raise Exception("Could not get BSS entry for mesh") + + for i in range(1, 3): + with alloc_fail(dev[1], i, "mesh_attr_text"): + bss = dev[1].get_bss(bssid) + if bss is not None: + raise Exception("Unexpected BSS result during OOM")