Busy loop for waiting is not going to work with time-travel=inf-cpu, so
need to something a bit more explicit to wait for the wpa_supplicant
process to proceed while not fully breaking the idea of this test case
to iteration through large number of STATUS-VERBOSE commands to hit
different states.
Signed-off-by: Jouni Malinen <j@w1.fi>
decisions = []
req_methods = []
selected_methods = []
+ connected = False
for i in range(100000):
+ if not connected and i % 10 == 9:
+ ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=0.0001)
+ if ev:
+ connected = True
s = dev[0].get_status(extra="VERBOSE")
if 'EAP state' in s:
state = s['EAP state']
logger.info("selectedMethods: " + str(selected_methods))
if not success:
raise Exception("EAP did not succeed")
- dev[0].wait_connected()
+ if not connected:
+ dev[0].wait_connected()
dev[0].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()