]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: hostapd ctrl_iface SET_NEIGHBOR failures
authorJouni Malinen <j@w1.fi>
Sat, 20 Mar 2021 11:13:24 +0000 (13:13 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 20 Mar 2021 11:13:24 +0000 (13:13 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_rrm.py

index 84318f6cb64fa3836b3d5d8c9e25c88ef50cdd81..9111a357eaca8717d23d2054e7cae5dff1cc4f0d 100644 (file)
@@ -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"}