]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Avoid failure in IBSS testing due to old scan results
authorJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 09:45:29 +0000 (11:45 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 09:45:29 +0000 (11:45 +0200)
ibss_open_fixed_bssid could leave behind old BSS entries that would
survive to the next test case. ibss_vht_80p80 would fail to establish
the IBSS on the expected channel in such cases. Explicitly flush the BSS
entries from kernel to avoid this.

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

index f2b3e700666f4c1545d043d845e24eb99069848b..be4ad7a7c1d6ce215012b3aa68fb886450455ea2 100644 (file)
@@ -355,9 +355,13 @@ def test_ibss_open_fixed_bssid(dev):
             raise Exception("STA0 BSSID " + bssid0 + " differs from fixed BSSID " + bssid)
         if bssid1 != bssid:
             raise Exception("STA0 BSSID " + bssid0 + " differs from fixed BSSID " + bssid)
+        dev[0].request("DISCONNECT")
+        dev[1].request("DISCONNECT")
     finally:
         dev[0].request("AP_SCAN 1")
         dev[1].request("AP_SCAN 1")
+        dev[0].flush_scan_cache()
+        dev[1].flush_scan_cache()
 
 def test_ibss_open_retry(dev):
     """IBSS open (no security) with cfg80211 retry workaround"""