]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make multi_ap_backhaul_roam_with_bridge more robust
authorJouni Malinen <j@w1.fi>
Sun, 14 Feb 2021 18:12:48 +0000 (20:12 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Feb 2021 18:12:48 +0000 (20:12 +0200)
Clear the scan cache and make sure the new AP gets discovered before
issuing the ROAM command.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_multi_ap.py

index 873401fd490e25dba43cbcf1a4cbccd783fa993d..ff761f36edda214c8a33c17d1db4d5a2091e1ca2 100644 (file)
@@ -61,6 +61,7 @@ def run_multi_ap_backhaul_roam_with_bridge(dev, apdev):
     subprocess.call(['iw', ifname, 'set', '4addr', 'on'])
     subprocess.check_call(['brctl', 'addif', br_ifname, ifname])
     wpas.interface_add(ifname, br_ifname=br_ifname)
+    wpas.flush_scan_cache()
 
     params = hostapd.wpa2_params(ssid="multi-ap", passphrase="12345678")
     params["multi_ap"] = "1"
@@ -71,7 +72,7 @@ def run_multi_ap_backhaul_roam_with_bridge(dev, apdev):
 
     hapd2 = hostapd.add_ap(apdev[1], params)
     bssid2 = hapd2.own_addr()
-    wpas.scan_for_bss(bssid2, freq="2412")
+    wpas.scan_for_bss(bssid2, freq="2412", force_scan=True)
     wpas.roam(bssid2)
 
 def test_multi_ap_disabled_on_ap(dev, apdev):