[PATCH 3/7] tests: Add sleep to ensure wlantest processed packets

Benjamin Berg benjamin at sipsolutions.net
Wed Jun 11 01:47:25 PDT 2025


From: Benjamin Berg <benjamin.berg at intel.com>

At least with EEVDF it appears to occasionally happen that wlantest has
not processed all packets but does respond to the command to query the
BSS counter. Fix this by inserting a sleep.

An alternative approach could be to force command handling into a
timeout or introducing a priority concept to eloop.

Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 tests/hwsim/test_ap_ciphers.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/hwsim/test_ap_ciphers.py b/tests/hwsim/test_ap_ciphers.py
index a3d8aa0f3a..9078e4497c 100644
--- a/tests/hwsim/test_ap_ciphers.py
+++ b/tests/hwsim/test_ap_ciphers.py
@@ -63,6 +63,7 @@ def check_group_mgmt_cipher(dev, ap, cipher, sta_req_cipher=None):
     hwsim_utils.test_connectivity(dev, hapd)
     hapd.request("DEAUTHENTICATE ff:ff:ff:ff:ff:ff")
     dev.wait_disconnected()
+    time.sleep(0.1)
     if wt.get_bss_counter('valid_bip_mmie', ap['bssid']) < 1:
         raise Exception("No valid BIP MMIE seen")
     if wt.get_bss_counter('bip_deauth', ap['bssid']) < 1:
-- 
2.49.0




More information about the Hostap mailing list