From e6c65001f8f2ea3af325f9dea4148418aec148f0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 27 Dec 2016 16:35:08 +0200 Subject: [PATCH] tests: Additional hostapd NEW_STA coverage Signed-off-by: Jouni Malinen --- tests/hwsim/test_hapd_ctrl.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_hapd_ctrl.py b/tests/hwsim/test_hapd_ctrl.py index d1f6f398a..69221cd15 100644 --- a/tests/hwsim/test_hapd_ctrl.py +++ b/tests/hwsim/test_hapd_ctrl.py @@ -7,7 +7,7 @@ from remotehost import remote_compatible import hostapd import hwsim_utils -from utils import skip_with_fips +from utils import skip_with_fips, alloc_fail @remote_compatible def test_hapd_ctrl_status(dev, apdev): @@ -139,6 +139,11 @@ def test_hapd_ctrl_new_sta(dev, apdev): raise Exception("Unexpected NEW_STA failure") if "AUTHORIZED" not in hapd.request("STA 00:11:22:33:44:55"): raise Exception("Unexpected NEW_STA STA status") + if "OK" not in hapd.request("NEW_STA 00:11:22:33:44:55"): + raise Exception("Unexpected NEW_STA failure") + with alloc_fail(hapd, 1, "ap_sta_add;hostapd_ctrl_iface_new_sta"): + if "FAIL" not in hapd.request("NEW_STA 00:11:22:33:44:66"): + raise Exception("Unexpected NEW_STA success during OOM") @remote_compatible def test_hapd_ctrl_get(dev, apdev):