diff --git a/tests/hwsim/test_rfkill.py b/tests/hwsim/test_rfkill.py index 5043dea5f..6c66258b8 100644 --- a/tests/hwsim/test_rfkill.py +++ b/tests/hwsim/test_rfkill.py @@ -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) diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py index a70a3fe08..8d30a3aec 100644 --- a/tests/hwsim/test_wpas_ctrl.py +++ b/tests/hwsim/test_wpas_ctrl.py @@ -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")