aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-07-11 18:10:59 (GMT)
committerJouni Malinen <j@w1.fi>2016-07-11 18:56:56 (GMT)
commit3e5f781800df7759b5949a48fbd43642d4a01d14 (patch)
treee47eb53964d48a9722fd4fa7a526200aa84508d5
parent99a9423c7bb72cbca9d4822e1c7032b8f27e3bc1 (diff)
downloadhostap-3e5f781800df7759b5949a48fbd43642d4a01d14.zip
hostap-3e5f781800df7759b5949a48fbd43642d4a01d14.tar.gz
hostap-3e5f781800df7759b5949a48fbd43642d4a01d14.tar.bz2
tests: Extend GAS error case coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_gas.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py
index 0bc1460..2d0556c 100644
--- a/tests/hwsim/test_gas.py
+++ b/tests/hwsim/test_gas.py
@@ -388,7 +388,8 @@ def test_gas_anqp_get(dev, apdev):
"00:11:22:33:44:55 32",
"00:11:22:33:44:55",
"00:11:22:33:44:55 ",
- "00:11:22:33:44:55 0" ]
+ "00:11:22:33:44:55 0",
+ "00:11:22:33:44:55 1" ]
for cmd in cmds:
if "FAIL" not in dev[0].request("HS20_ANQP_GET " + cmd):
raise Exception("Invalid HS20_ANQP_GET accepted")
@@ -402,6 +403,18 @@ def test_gas_anqp_get_oom(dev, apdev):
with alloc_fail(dev[0], 1, "wpabuf_alloc;anqp_send_req"):
if "FAIL" not in dev[0].request("ANQP_GET " + bssid + " 258,268,hs20:3,hs20:4"):
raise Exception("ANQP_GET command accepted during OOM")
+ with alloc_fail(dev[0], 1, "hs20_build_anqp_req;hs20_anqp_send_req"):
+ if "FAIL" not in dev[0].request("HS20_ANQP_GET " + bssid + " 1"):
+ raise Exception("HS20_ANQP_GET command accepted during OOM")
+ with alloc_fail(dev[0], 1, "gas_query_req;hs20_anqp_send_req"):
+ if "FAIL" not in dev[0].request("HS20_ANQP_GET " + bssid + " 1"):
+ raise Exception("HS20_ANQP_GET command accepted during OOM")
+ with alloc_fail(dev[0], 1, "=hs20_anqp_send_req"):
+ if "FAIL" not in dev[0].request("REQ_HS20_ICON " + bssid + " w1fi_logo"):
+ raise Exception("REQ_HS20_ICON command accepted during OOM")
+ with alloc_fail(dev[0], 2, "=hs20_anqp_send_req"):
+ if "FAIL" not in dev[0].request("REQ_HS20_ICON " + bssid + " w1fi_logo"):
+ raise Exception("REQ_HS20_ICON command accepted during OOM")
def expect_gas_result(dev, result, status=None):
ev = dev.wait_event(["GAS-QUERY-DONE"], timeout=10)