tests: Split event wait in grpform_cred_ready_timeout

The long wait for the monitor socket events resulted in another socket
running out of TX buffer space. Split the wait into smaller segments and
clear the other socket in each iteration.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-03-17 16:00:18 +02:00
parent e4b4e1748a
commit 3a88b7e6e9
2 changed files with 12 additions and 5 deletions

View file

@ -884,14 +884,14 @@ class WpaSupplicant:
if "reason=GO_ENDING_SESSION" not in ev:
raise Exception("Unexpected group removal reason")
def dump_monitor(self):
def dump_monitor(self, mon=True, global_mon=True):
count_iface = 0
count_global = 0
while self.monitor and self.mon.pending():
while mon and self.monitor and self.mon.pending():
ev = self.mon.recv()
logger.debug(self.dbg + ": " + ev)
count_iface += 1
while self.monitor and self.global_mon and self.global_mon.pending():
while global_mon and self.monitor and self.global_mon and self.global_mon.pending():
ev = self.global_mon.recv()
logger.debug(self.global_dbg + self.ifname + "(global): " + ev)
count_global += 1