]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: rrm_neighbor_db and neighbor removal without specifying SSID
authorJouni Malinen <j@w1.fi>
Thu, 26 Dec 2019 09:04:23 +0000 (11:04 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Dec 2019 09:05:54 +0000 (11:05 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_rrm.py

index c9c8d6103b1f526d26d773a8b5ba2fc71ef06384..4f62ee0fad9bad446687a4b04d6fc9dbee652693 100644 (file)
@@ -149,6 +149,10 @@ def test_rrm_neighbor_db(dev, apdev):
     if "OK" not in hapd.request("REMOVE_NEIGHBOR 00:11:22:33:44:55 ssid=\"test3\""):
         raise Exception("Remove neighbor failed")
 
+    # Add an entry for following REMOVE_NEIGHBOR tests
+    if "OK" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 ssid=7465737431 nr=" + nr):
+        raise Exception("Set neighbor failed")
+
     # Invalid remove - bad BSSID
     if "FAIL" not in hapd.request("REMOVE_NEIGHBOR 00:11:22:33:44:5 ssid=\"test1\""):
         raise Exception("Remove neighbor succeeded unexpectedly")
@@ -157,9 +161,9 @@ def test_rrm_neighbor_db(dev, apdev):
     if "FAIL" not in hapd.request("REMOVE_NEIGHBOR 00:11:22:33:44:55 ssid=\"test1"):
         raise Exception("Remove neighbor succeeded unexpectedly")
 
-    # Invalid remove - missing SSID
-    if "FAIL" not in hapd.request("REMOVE_NEIGHBOR 00:11:22:33:44:55"):
-        raise Exception("Remove neighbor succeeded unexpectedly")
+    # Remove without specifying SSID
+    if "OK" not in hapd.request("REMOVE_NEIGHBOR 00:11:22:33:44:55"):
+        raise Exception("Remove neighbor without SSID failed")
 
 def test_rrm_neighbor_rep_req(dev, apdev):
     """wpa_supplicant ctrl_iface NEIGHBOR_REP_REQUEST"""