]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: UPDATE_BEACON on disabled interface
authorJouni Malinen <jouni@codeaurora.org>
Wed, 21 Apr 2021 20:24:58 +0000 (23:24 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 21 Apr 2021 20:24:58 +0000 (23:24 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_hapd_ctrl.py

index 93d3d177eeee75f3a672b6a29a5e4fd9360e9c7f..9cf8ac73ce33b1dd21d23cfdad52cbefab799019 100644 (file)
@@ -1002,6 +1002,12 @@ def test_hapd_ctrl_update_beacon(dev, apdev):
         if "FAIL" not in hapd.request("UPDATE_BEACON"):
             raise Exception("UPDATE_BEACON succeeded unexpectedly")
     dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
+    dev[0].request("DISCONNECT")
+    if "OK" not in hapd.request("UPDATE_BEACON"):
+        raise Exception("UPDATE_BEACON failed")
+    hapd.disable()
+    if "FAIL" not in hapd.request("UPDATE_BEACON"):
+        raise Exception("UPDATE_BEACON did not indicate failure when disabled")
 
 def test_hapd_ctrl_test_fail(dev, apdev):
     """hostapd and TEST_ALLOC_FAIL/TEST_FAIL"""