]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Wait after removing a BSS
authorIlan Peer <ilan.peer@intel.com>
Mon, 8 Apr 2024 13:06:55 +0000 (16:06 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 21 Apr 2024 07:53:39 +0000 (10:53 +0300)
When a BSS is removed, the flow continues without actually
waiting for the AP to be stopped. This is racy in flows that
actually expect the AP to be stopped, e.g., test_ap_bss_add_remove().

Try to mitigate such cases by adding a short sleep after the
AP is removed.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
tests/hwsim/hostapd.py

index 007812274b6b0d7e59cd6d261eaee34d4356883c..ebb2e328af503cfc0b9cbed7db5014865b0d04a2 100644 (file)
@@ -766,6 +766,9 @@ def remove_bss(apdev, ifname=None):
     hapd_global = HostapdGlobal(apdev)
     hapd_global.remove(ifname)
 
+    # wait little to make sure the AP stops beaconing
+    time.sleep(0.1)
+
 def terminate(apdev):
     try:
         hostname = apdev['hostname']