From d5ce180a60ad4bcb9fd3470b4e492395aa8ede12 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 21 Apr 2021 23:24:58 +0300 Subject: [PATCH] tests: UPDATE_BEACON on disabled interface Signed-off-by: Jouni Malinen --- tests/hwsim/test_hapd_ctrl.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hwsim/test_hapd_ctrl.py b/tests/hwsim/test_hapd_ctrl.py index 93d3d177e..9cf8ac73c 100644 --- a/tests/hwsim/test_hapd_ctrl.py +++ b/tests/hwsim/test_hapd_ctrl.py @@ -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"""