From 3429e2ff36e7acc1c8ea2706a1c0b62504d8311e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 3 Jul 2016 22:02:21 +0300 Subject: [PATCH] tests: GAS/ANQP query OOM Signed-off-by: Jouni Malinen --- tests/hwsim/test_gas.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index d705d9c50..0bc146094 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -393,6 +393,16 @@ def test_gas_anqp_get(dev, apdev): if "FAIL" not in dev[0].request("HS20_ANQP_GET " + cmd): raise Exception("Invalid HS20_ANQP_GET accepted") +def test_gas_anqp_get_oom(dev, apdev): + """GAS/ANQP query OOM""" + hapd = start_ap(apdev[0]) + bssid = apdev[0]['bssid'] + + dev[0].scan_for_bss(bssid, freq="2412", force_scan=True) + 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") + def expect_gas_result(dev, result, status=None): ev = dev.wait_event(["GAS-QUERY-DONE"], timeout=10) if ev is None: