]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: wpa_supplicant mesh scan results and OOM
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 30 May 2016 17:03:32 +0000 (20:03 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 30 May 2016 17:03:32 +0000 (20:03 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_wpas_mesh.py

index 17668e740303c65a8bb7f4864aebc52f43094602..0ef22776b4b55f57203e3626c21963174a851265 100644 (file)
@@ -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")