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 <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-02-18 16:47:29 +02:00 committed by Jouni Malinen
parent d2e11b7dea
commit d5fbbbbc4c

View file

@ -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)