From: Benjamin Berg Date: Wed, 11 Jun 2025 08:47:25 +0000 (+0200) Subject: tests: Add sleep to ensure wlantest processed packets X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1b86bf467c4a6c8c4b861b79476cf1ebb23e376;p=thirdparty%2Fhostap.git tests: Add sleep to ensure wlantest processed packets 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 Reviewed-by: Andrei Otcheretianski --- diff --git a/tests/hwsim/test_ap_ciphers.py b/tests/hwsim/test_ap_ciphers.py index a3d8aa0f3..9078e4497 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: