tests: Fix hostapd.wait_sta()

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>
This commit is contained in:
Jouni Malinen 2019-08-07 12:34:24 +03:00 committed by Jouni Malinen
parent 3263fca289
commit c4a9610e8f

View 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: