From 5cf0930f9c459e1ed4c9b212efea49a704f240ce Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 12 Feb 2017 18:10:25 +0200 Subject: [PATCH] testS: Additional BSS TM error case coverage Signed-off-by: Jouni Malinen --- tests/hwsim/test_wnm.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 7592a4383..60da98bff 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -659,6 +659,7 @@ def test_wnm_bss_tm_errors(dev, apdev): "BSS_TM_REQ %s neighbor=02:11:22:33:44:55,0,0,0" % addr, "BSS_TM_REQ %s neighbor=02:11:22:33:44:55,0,0,0,0,q" % addr, "BSS_TM_REQ %s neighbor=02:11:22:33:44:55,0,0,0,0,0q" % addr, + "BSS_TM_REQ " + addr + " url=" + 256*'a', "BSS_TM_REQ %s url=foo mbo=1:2" % addr, "BSS_TM_REQ %s url=foo mbo=100000:0:0" % addr, "BSS_TM_REQ %s url=foo mbo=0:0:254" % addr, @@ -671,6 +672,14 @@ def test_wnm_bss_tm_errors(dev, apdev): if "FAIL" not in hapd.request("BSS_TM_REQ %s url=http://foo" % addr): raise Exception("BSS_TM_REQ accepted during OOM") + with alloc_fail(hapd, 1, "=wnm_send_bss_tm_req"): + if "FAIL" not in hapd.request("BSS_TM_REQ %s url=http://foo" % addr): + raise Exception("BSS_TM_REQ accepted during OOM") + + with fail_test(hapd, 1, "wnm_send_bss_tm_req"): + if "FAIL" not in hapd.request("BSS_TM_REQ %s url=http://foo" % addr): + raise Exception("BSS_TM_REQ accepted during failure testing") + def test_wnm_bss_tm_termination(dev, apdev): """WNM BSS Transition Management and BSS termination""" params = { "ssid": "test-wnm",