]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix hostapd.wait_sta()
authorJouni Malinen <jouni@codeaurora.org>
Wed, 7 Aug 2019 09:34:24 +0000 (12:34 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 7 Aug 2019 09:36:36 +0000 (12:36 +0300)
wait_event() expects a list of events instead of a single event name.
The previous implementation of wait_sta() did not really wait for
AP-STA-CONNECT; instead, it returned the next event from hostapd
regardless of what that event was.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/hostapd.py

index db941b6c170cbe52c94ddd70daad902e981abca3..a0b8cac188e0fda20d8a5511767d9a2310eae15c 100644 (file)
@@ -263,7 +263,7 @@ class Hostapd:
         return None
 
     def wait_sta(self, addr=None, timeout=2):
-        ev = self.wait_event("AP-STA-CONNECT", timeout=timeout)
+        ev = self.wait_event(["AP-STA-CONNECT"], timeout=timeout)
         if ev is None:
             raise Exception("AP did not report STA connection")
         if addr and addr not in ev: