From: Jouni Malinen Date: Sat, 23 Jul 2016 17:51:55 +0000 (+0300) Subject: tests: DRIVER_FLAGS command X-Git-Tag: hostap_2_6~189 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce4af563220a835875d87485c8c97e3723f380ea;p=thirdparty%2Fhostap.git tests: DRIVER_FLAGS command Signed-off-by: Jouni Malinen --- 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")