tests: Update authsrv_oom match changed implementation

Need to take into account the additional memory allocation within
radius_server_init().

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-08-18 17:39:58 +03:00
parent 822e7c66ae
commit 0bcd9839bf

View file

@ -143,6 +143,9 @@ def test_authsrv_oom(dev, apdev):
if "FAIL" not in authsrv.request("ENABLE"): if "FAIL" not in authsrv.request("ENABLE"):
raise Exception("ENABLE succeeded during OOM") raise Exception("ENABLE succeeded during OOM")
with alloc_fail(authsrv, 2, "radius_server_init;hostapd_setup_radius_srv"): with alloc_fail(authsrv, 2, "radius_server_init;hostapd_setup_radius_srv"):
if "FAIL" not in authsrv.request("ENABLE"):
raise Exception("ENABLE succeeded during OOM")
with alloc_fail(authsrv, 3, "radius_server_init;hostapd_setup_radius_srv"):
authsrv.request("ENABLE") authsrv.request("ENABLE")
# This is actually allowed to continue even though memory allocation # This is actually allowed to continue even though memory allocation
# fails. # fails.