tests: Extend coverage for mesh OOM testing
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
56d62fc3dd
commit
ec87430ba1
1 changed files with 28 additions and 8 deletions
|
@ -1050,14 +1050,34 @@ def test_mesh_oom(dev, apdev):
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Init failure not reported")
|
raise Exception("Init failure not reported")
|
||||||
|
|
||||||
for i in range(1, 65):
|
with alloc_fail(dev[0], 4, "=wpa_supplicant_mesh_init"):
|
||||||
with alloc_fail(dev[0], i, "wpa_supplicant_mesh_init"):
|
add_open_mesh_network(dev[0], basic_rates="60 120 240")
|
||||||
add_open_mesh_network(dev[0])
|
ev = dev[0].wait_event(["Failed to init mesh"])
|
||||||
wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
|
if ev is None:
|
||||||
ev = dev[0].wait_event(["Failed to init mesh",
|
raise Exception("Init failure not reported")
|
||||||
"MESH-GROUP-STARTED"])
|
|
||||||
if ev is None:
|
for i in range(1, 66):
|
||||||
raise Exception("Init failure not reported")
|
dev[0].dump_monitor()
|
||||||
|
logger.info("Test instance %d" % i)
|
||||||
|
try:
|
||||||
|
with alloc_fail(dev[0], i, "wpa_supplicant_mesh_init"):
|
||||||
|
add_open_mesh_network(dev[0])
|
||||||
|
wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
|
||||||
|
ev = dev[0].wait_event(["Failed to init mesh",
|
||||||
|
"MESH-GROUP-STARTED"])
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Init failure not reported")
|
||||||
|
except Exception, e:
|
||||||
|
if i < 15:
|
||||||
|
raise
|
||||||
|
logger.info("Ignore no-oom for i=%d" % i)
|
||||||
|
|
||||||
|
with alloc_fail(dev[0], 5, "=wpa_supplicant_mesh_init"):
|
||||||
|
id = add_mesh_secure_net(dev[0])
|
||||||
|
dev[0].mesh_group_add(id)
|
||||||
|
ev = dev[0].wait_event(["Failed to init mesh"])
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Init failure not reported")
|
||||||
|
|
||||||
def test_mesh_add_interface_oom(dev):
|
def test_mesh_add_interface_oom(dev):
|
||||||
"""wpa_supplicant mesh with dynamic interface addition failing"""
|
"""wpa_supplicant mesh with dynamic interface addition failing"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue