Skip to contentSkip to conversation

auto-t: fix failing adhoc test

PATCH New James Prestwood 1 participant 1 message May 5, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 auto-t: fix failing adhoc test

There appears to be a race condition in the kernel where if two stations (using the same kernel) do a join IBSS at the same time the New Station event never comes in (as if no other station has joined the IBSS).

Until this is sorted out, a sleep between starting the IBSS fixes the issue for the test.

---
 autotests/testAdHoc/adhoc_test.py | 2 ++
 1 file changed, 2 insertions(+)
autotests/testAdHoc/adhoc_test.py +2 -0
index 119c6c7e..27c87a82 100644
@@ -8,6 +8,7 @@ sys.path.append('../util')
 import iwd
 from iwd import IWD
 import testutil
+from time import sleep
 
 class Test(unittest.TestCase):
 
@@ -18,6 +19,7 @@ class Test(unittest.TestCase):
         self.assertIsNotNone(dev2)
 
         dev1.start_adhoc("AdHocNetwork", "secret123")
+        sleep(1)
         dev2.start_adhoc("AdHocNetwork", "secret123")
 
         dev1.adhoc_wait_for_connected(dev2.address)
Signature · 1 line
2.21.1