From 76f9133cf51cb150e509decfd16ea0f4081f4a59 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 27 Dec 2016 21:10:45 +0200 Subject: [PATCH] tests: hostapd and UPDATE_BEACON Signed-off-by: Jouni Malinen --- tests/hwsim/test_hapd_ctrl.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_hapd_ctrl.py b/tests/hwsim/test_hapd_ctrl.py index f7921b5bc..125924c93 100644 --- a/tests/hwsim/test_hapd_ctrl.py +++ b/tests/hwsim/test_hapd_ctrl.py @@ -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")