]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: hostapd and UPDATE_BEACON
authorJouni Malinen <j@w1.fi>
Tue, 27 Dec 2016 19:10:45 +0000 (21:10 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 28 Dec 2016 12:31:43 +0000 (14:31 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_hapd_ctrl.py

index f7921b5bc4a4051cd5f40dbbc873890b531f7bd0..125924c9392b9420c5ef28b5b0b277c27fc18f7d 100644 (file)
@@ -7,7 +7,7 @@
 from remotehost import remote_compatible
 import hostapd
 import hwsim_utils
-from utils import skip_with_fips, alloc_fail
+from utils import skip_with_fips, alloc_fail, fail_test
 
 @remote_compatible
 def test_hapd_ctrl_status(dev, apdev):
@@ -855,3 +855,15 @@ def test_hapd_ctrl_poll_sta_errors(dev, apdev):
     for t in tests:
         if "FAIL" not in hapd.request("POLL_STA " + t):
             raise Exception("Invalid POLL_STA command accepted: " + t)
+
+def test_hapd_ctrl_update_beacon(dev, apdev):
+    """hostapd and UPDATE_BEACON"""
+    ssid = "hapd-ctrl"
+    params = { "ssid": ssid }
+    hapd = hostapd.add_ap(apdev[0], params)
+    if "OK" not in hapd.request("UPDATE_BEACON"):
+        raise Exception("UPDATE_BEACON failed")
+    with fail_test(hapd, 1, "ieee802_11_set_beacon"):
+        if "FAIL" not in hapd.request("UPDATE_BEACON"):
+            raise Exception("UPDATE_BEACON succeeded unexpectedly")
+    dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")