From d5fbbbbc4ce4ddcf285619f49a49ed87de79b276 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 18 Feb 2022 16:47:29 +0200 Subject: [PATCH] tests: Make wpas_mesh_mode_scan more robust Clear scan results to avoid issues with get_bss() finding an entry from an earlier test case when checking for mesh information. Signed-off-by: Jouni Malinen --- tests/hwsim/test_wpas_mesh.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 4b9209e59..cbc2857f9 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -70,6 +70,10 @@ def check_mesh_scan(dev, params, other_started=False, beacon_int=0): bss = dev.get_bss(bssid) if bss is None: raise Exception("Could not get BSS entry for mesh") + if 'mesh_id' not in bss: + raise Exception("mesh_id missing from BSS entry") + if bss['mesh_id'] != "wpas-mesh-open": + raise Exception("Incorrect mesh_id: " + bss['mesh_id']) if 'mesh_capability' not in bss: raise Exception("mesh_capability missing from BSS entry") if beacon_int: @@ -243,6 +247,7 @@ def test_wpas_mesh_peer_disconnected(dev): def test_wpas_mesh_mode_scan(dev): """wpa_supplicant MESH scan support""" check_mesh_support(dev[0]) + dev[0].flush_scan_cache() add_open_mesh_network(dev[0]) add_open_mesh_network(dev[1], beacon_int=175) -- 2.47.3