From: Jouni Malinen Date: Sat, 20 Mar 2021 11:13:24 +0000 (+0200) Subject: tests: hostapd ctrl_iface SET_NEIGHBOR failures X-Git-Tag: hostap_2_10~364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be06fd5b0221dc51ca60c7891c9e7d4842e420ab;p=thirdparty%2Fhostap.git tests: hostapd ctrl_iface SET_NEIGHBOR failures Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py index 84318f6cb..9111a357e 100644 --- a/tests/hwsim/test_rrm.py +++ b/tests/hwsim/test_rrm.py @@ -212,6 +212,20 @@ def test_rrm_neighbor_db(dev, apdev): if apdev[0]['bssid'] not in res: raise Exception("Own BSS not visible in SHOW_NEIGHBOR output") +def test_rrm_neighbor_db_failures(dev, apdev): + """hostapd ctrl_iface SET_NEIGHBOR failures""" + params = {"ssid": "test", "rrm_neighbor_report": "1"} + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + cmd = "SET_NEIGHBOR 00:11:22:33:44:55 ssid=\"test1\" nr=" + nr + " lci=" + lci + " civic=" + civic + tests = [(1, "hostapd_neighbor_add"), + (1, "wpabuf_dup;hostapd_neighbor_set"), + (2, "wpabuf_dup;hostapd_neighbor_set"), + (3, "wpabuf_dup;hostapd_neighbor_set")] + for count, func in tests: + with alloc_fail(hapd, count, func): + if "FAIL" not in hapd.request(cmd): + raise Exception("Set neighbor succeeded") + def test_rrm_neighbor_db_disabled(dev, apdev): """hostapd ctrl_iface SHOW_NEIGHBOR while neighbor report disabled""" params = {"ssid": "test"}