From: Jouni Malinen Date: Fri, 18 Feb 2022 14:47:29 +0000 (+0200) Subject: tests: Make wpas_mesh_mode_scan more robust X-Git-Tag: hostap_2_11~2224 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5fbbbbc4ce4ddcf285619f49a49ed87de79b276;p=thirdparty%2Fhostap.git 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 --- 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)