tests: Additional coverage for miscellaneous ctrl_iface commands

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-12-13 19:30:21 +02:00
parent 5407c69d15
commit 6eae42f98f
2 changed files with 27 additions and 0 deletions

View file

@ -42,6 +42,13 @@ def test_rfkill_open(dev, apdev):
if ev is None:
raise Exception("Missing disconnection event on rfkill block")
if "FAIL" not in dev[0].request("REASSOCIATE"):
raise Exception("REASSOCIATE accepted while disabled")
if "FAIL" not in dev[0].request("REATTACH"):
raise Exception("REATTACH accepted while disabled")
if "FAIL" not in dev[0].request("RECONNECT"):
raise Exception("RECONNECT accepted while disabled")
logger.info("rfkill unblock")
subprocess.call(['sudo', 'rfkill', 'unblock', id])
ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)

View file

@ -1275,3 +1275,23 @@ def test_wpas_ctrl_vendor_elem(dev, apdev):
raise Exception("Invalid VENDOR_ELEM_REMOVE command accepted: " + cmd)
if "OK" not in dev[0].request("VENDOR_ELEM_REMOVE 1 000100"):
raise Exception("VENDOR_ELEM_REMOVE failed")
def test_wpas_ctrl_misc(dev, apdev):
"""wpa_supplicant ctrl_iface and miscellaneous commands"""
if "OK" not in dev[0].request("RELOG"):
raise Exception("RELOG failed")
if dev[0].request("IFNAME") != dev[0].ifname:
raise Exception("IFNAME returned unexpected response")
if "FAIL" not in dev[0].request("REATTACH"):
raise Exception("REATTACH accepted while disabled")
if "OK" not in dev[2].request("RECONFIGURE"):
raise Exception("RECONFIGURE failed")
if "FAIL" in dev[0].request("INTERFACE_LIST"):
raise Exception("INTERFACE_LIST failed")
if "UNKNOWN COMMAND" not in dev[0].request("FOO"):
raise Exception("Unknown command accepted")
if "FAIL" not in dev[0].global_request("INTERFACE_REMOVE foo"):
raise Exception("Invalid INTERFACE_REMOVE accepted")
if "FAIL" not in dev[0].global_request("SET foo"):
raise Exception("Invalid global SET accepted")