From ce4af563220a835875d87485c8c97e3723f380ea Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 23 Jul 2016 20:51:55 +0300 Subject: [PATCH] tests: DRIVER_FLAGS command Signed-off-by: Jouni Malinen --- tests/hwsim/test_wpas_ctrl.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py index aff58b0cb..96ed551be 100644 --- a/tests/hwsim/test_wpas_ctrl.py +++ b/tests/hwsim/test_wpas_ctrl.py @@ -1958,3 +1958,18 @@ def test_wpas_ctrl_p2p_listen_offload(dev, apdev): dev[0].request("P2P_LO_START 2412") dev[0].request("P2P_LO_START 2412 100 200 3") dev[0].request("P2P_LO_STOP") + +def test_wpas_ctrl_driver_flags(dev, apdev): + """DRIVER_FLAGS command""" + params = hostapd.wpa2_params(ssid="test", passphrase="12345678") + hapd = hostapd.add_ap(apdev[0], params) + hapd_flags = hapd.request("DRIVER_FLAGS") + wpas_flags = dev[0].request("DRIVER_FLAGS") + if "FAIL" in hapd_flags: + raise Exception("DRIVER_FLAGS failed") + if hapd_flags != wpas_flags: + raise Exception("Unexpected difference in hostapd vs. wpa_supplicant DRIVER_FLAGS output") + logger.info("DRIVER_FLAGS: " + hapd_flags) + flags = hapd_flags.split('\n') + if 'AP' not in flags: + raise Exception("AP flag missing from DRIVER_FLAGS")