]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix race condition in fst_setup_mbie_diff
authorBenjamin Berg <benjamin.berg@intel.com>
Fri, 27 Sep 2024 09:36:20 +0000 (11:36 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 19 Dec 2024 21:52:18 +0000 (23:52 +0200)
The allocation failure could be checked before the operation had
completed. Fix this by enabling the wait in the call to fst_setup_req.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
tests/hwsim/test_fst_module.py

index 6aeb9574753da55cc46f5a1b3c4702e61b4205b7..39e56fa249d21b134ff1bb0c2291d27364247312 100644 (file)
@@ -2542,8 +2542,11 @@ def _test_fst_setup_mbie_diff(dev, apdev, test_params):
     mbie = "9e16040200010200000004000000000000000000000000ff"
     try:
         with alloc_fail(hapd, 1, "mb_ies_by_info"):
+            # If no_wait is set to True an explicit wait would need to be
+            # inserted to ensure the failure was triggered. However, as the
+            # setup succeeds (currently), we can simply do the wait here.
             fst_setup_req(wpas, hglobal, 5180, apdev[0]['bssid'], req, stie,
-                          mbie, no_wait=True)
+                          mbie, no_wait=False)
     except HwsimSkip as e:
         # Skip exception to allow proper cleanup
         pass