[PATCH 1/3] tests: Fix race condition in test_fst_setup_mbie_diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Benjamin Berg <benjamin.berg@xxxxxxxxx>

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@xxxxxxxxx>
---
 tests/hwsim/test_fst_module.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_fst_module.py b/tests/hwsim/test_fst_module.py
index 589a87c543..5c0d365909 100644
--- a/tests/hwsim/test_fst_module.py
+++ b/tests/hwsim/test_fst_module.py
@@ -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
-- 
2.46.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux