tests: Avoid control interface throttling in various test cases
These can cause unexpected test failures, so dump the pending monitor socket events more frequently in some cases where event throttling is seen. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
9ac0e785c3
commit
07c9f183ea
6 changed files with 59 additions and 10 deletions
|
@ -301,8 +301,10 @@ def test_wpas_ctrl_network_oom(dev):
|
|||
@remote_compatible
|
||||
def test_wpas_ctrl_many_networks(dev, apdev):
|
||||
"""wpa_supplicant ctrl_iface LIST_NETWORKS with huge number of networks"""
|
||||
for i in range(1000):
|
||||
id = dev[0].add_network()
|
||||
for i in range(999):
|
||||
dev[0].add_network()
|
||||
dev[0].dump_monitor()
|
||||
id = dev[0].add_network()
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-NETWORK-ADDED %d" % id])
|
||||
if ev is None:
|
||||
raise Exception("Network added event not seen for the last network")
|
||||
|
@ -320,12 +322,24 @@ def test_wpas_ctrl_many_networks(dev, apdev):
|
|||
# power CPU, so increase the command timeout significantly to avoid issues
|
||||
# with the test case failing and following reset operation timing out.
|
||||
dev[0].request("REMOVE_NETWORK all", timeout=60)
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-NETWORK-REMOVED %d" % id])
|
||||
if ev is None:
|
||||
raise Exception("Network removed event not seen for the last network")
|
||||
ev = dev[0].wait_global_event(["CTRL-EVENT-NETWORK-REMOVED %d" % id], timeout=10)
|
||||
if ev is None:
|
||||
raise Exception("Network removed event (global) not seen for the last network")
|
||||
seen = seen_global = False
|
||||
|
||||
for i in range(1000):
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-NETWORK-REMOVED"])
|
||||
if ev is None:
|
||||
raise Exception("Network removed event not seen for the last network")
|
||||
if str(id) in ev:
|
||||
seen = True
|
||||
ev = dev[0].wait_global_event(["CTRL-EVENT-NETWORK-REMOVED"],
|
||||
timeout=10)
|
||||
if ev is None:
|
||||
raise Exception("Network removed event (global) not seen for the last network")
|
||||
if str(id) in ev:
|
||||
seen_global = True
|
||||
if not seen:
|
||||
raise Exception("Network removed event not seen for the last network")
|
||||
if not seen_global:
|
||||
raise Exception("Network removed event (global) not seen for the last network")
|
||||
dev[0].dump_monitor()
|
||||
|
||||
@remote_compatible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue