tests: Use the new BSSID_IGNORE name for the command
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
72cd4293fb
commit
7a1f1d8d77
3 changed files with 48 additions and 48 deletions
|
@ -582,17 +582,17 @@ def test_ap_open_select_network(dev, apdev):
|
|||
|
||||
dev[0].select_network(id1)
|
||||
dev[0].wait_connected()
|
||||
res = dev[0].request("BLACKLIST")
|
||||
res = dev[0].request("BSSID_IGNORE")
|
||||
if bssid1 in res or bssid2 in res:
|
||||
raise Exception("Unexpected blacklist entry")
|
||||
raise Exception("Unexpected BSSID ignore list entry")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd1)
|
||||
|
||||
dev[0].select_network(id2)
|
||||
dev[0].wait_connected()
|
||||
hwsim_utils.test_connectivity(dev[0], hapd2)
|
||||
res = dev[0].request("BLACKLIST")
|
||||
res = dev[0].request("BSSID_IGNORE")
|
||||
if bssid1 in res or bssid2 in res:
|
||||
raise Exception("Unexpected blacklist entry(2)")
|
||||
raise Exception("Unexpected BSSID ignore list entry(2)")
|
||||
|
||||
@remote_compatible
|
||||
def test_ap_open_disable_enable(dev, apdev):
|
||||
|
@ -913,9 +913,9 @@ def test_ap_open_disable_select(dev, apdev):
|
|||
|
||||
dev[0].request("DISABLE_NETWORK %d" % id)
|
||||
dev[0].wait_disconnected()
|
||||
res = dev[0].request("BLACKLIST")
|
||||
res = dev[0].request("BSSID_IGNORE")
|
||||
if hapd1.own_addr() in res or hapd2.own_addr() in res:
|
||||
raise Exception("Unexpected blacklist entry added")
|
||||
raise Exception("Unexpected BSSID ignore list entry added")
|
||||
dev[0].request("SELECT_NETWORK %d" % id)
|
||||
dev[0].wait_connected()
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ def test_ap_roam_open(dev, apdev):
|
|||
dev[0].roam(apdev[0]['bssid'])
|
||||
hwsim_utils.test_connectivity(dev[0], hapd0)
|
||||
|
||||
def test_ap_blacklist_all(dev, apdev, params):
|
||||
"""Ensure we clear the blacklist if all visible APs reject"""
|
||||
def test_ap_ignore_bssid_all(dev, apdev, params):
|
||||
"""Ensure we clear the ignore BSSID list if all visible APs reject"""
|
||||
hapd0 = hostapd.add_ap(apdev[0], {"ssid": "test-open", "max_num_sta": "0"})
|
||||
hapd1 = hostapd.add_ap(apdev[1], {"ssid": "test-open", "max_num_sta": "0"})
|
||||
bss0 = hapd0.own_addr()
|
||||
|
@ -43,13 +43,13 @@ def test_ap_blacklist_all(dev, apdev, params):
|
|||
wait_connect=False, bssid=bss1)
|
||||
if not dev[0].wait_event(["CTRL-EVENT-AUTH-REJECT"], timeout=10):
|
||||
raise Exception("AP 1 didn't reject us")
|
||||
blacklist = get_blacklist(dev[0])
|
||||
logger.info("blacklist: " + str(blacklist))
|
||||
ignore_list = get_bssid_ignore_list(dev[0])
|
||||
logger.info("ignore list: " + str(ignore_list))
|
||||
dev[0].request("REMOVE_NETWORK all")
|
||||
dev[0].dump_monitor()
|
||||
|
||||
hapd0.set("max_num_sta", "1")
|
||||
# All visible APs were blacklisted; we should clear the blacklist and find
|
||||
# All visible APs were ignored; we should clear the ignore list and find
|
||||
# the AP that now accepts us.
|
||||
dev[0].scan_for_bss(bss0, freq=2412)
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412", bssid=bss0)
|
||||
|
@ -141,8 +141,8 @@ def test_ap_roam_wpa2_psk_pmf_mismatch(dev, apdev):
|
|||
raise Exception("Unexpected BSSID reported after failed roam attempt: " + bssid)
|
||||
hwsim_utils.test_connectivity(dev[0], hapd0)
|
||||
|
||||
def get_blacklist(dev):
|
||||
return dev.request("BLACKLIST").splitlines()
|
||||
def get_bssid_ignore_list(dev):
|
||||
return dev.request("BSSID_IGNORE").splitlines()
|
||||
|
||||
def test_ap_reconnect_auth_timeout(dev, apdev, params):
|
||||
"""Reconnect to 2nd AP and authentication times out"""
|
||||
|
@ -162,7 +162,7 @@ def test_ap_reconnect_auth_timeout(dev, apdev, params):
|
|||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
bssid1 = hapd1.own_addr()
|
||||
|
||||
wpas.request("BLACKLIST " + bssid0)
|
||||
wpas.request("BSSID_IGNORE " + bssid0)
|
||||
|
||||
wpas.scan_for_bss(bssid1, freq=2412)
|
||||
wpas.request("DISCONNECT")
|
||||
|
@ -179,11 +179,11 @@ def test_ap_reconnect_auth_timeout(dev, apdev, params):
|
|||
if not ev:
|
||||
raise Exception("CTRL-EVENT-SCAN-STARTED not seen")
|
||||
|
||||
b = get_blacklist(wpas)
|
||||
b = get_bssid_ignore_list(wpas)
|
||||
if '00:00:00:00:00:00' in b:
|
||||
raise Exception("Unexpected blacklist contents: " + str(b))
|
||||
raise Exception("Unexpected ignore list contents: " + str(b))
|
||||
if bssid1 not in b:
|
||||
raise Exception("Unexpected blacklist contents: " + str(b))
|
||||
raise Exception("Unexpected ignore list contents: " + str(b))
|
||||
|
||||
def test_ap_roam_with_reassoc_auth_timeout(dev, apdev, params):
|
||||
"""Roam using reassoc between two APs and authentication times out"""
|
||||
|
@ -216,9 +216,9 @@ def test_ap_roam_with_reassoc_auth_timeout(dev, apdev, params):
|
|||
if not ev:
|
||||
raise Exception("CTRL-EVENT-SCAN-STARTED not seen")
|
||||
|
||||
b = get_blacklist(wpas)
|
||||
b = get_bssid_ignore_list(wpas)
|
||||
if bssid0 in b:
|
||||
raise Exception("Unexpected blacklist contents: " + str(b))
|
||||
raise Exception("Unexpected ignore list contents: " + str(b))
|
||||
|
||||
def test_ap_roam_wpa2_psk_failed(dev, apdev, params):
|
||||
"""Roam failure with WPA2-PSK AP due to wrong passphrase"""
|
||||
|
|
|
@ -687,8 +687,8 @@ def test_wpas_ctrl_addr(dev):
|
|||
raise Exception("Unexpected success on invalid WPS_REG")
|
||||
if "FAIL" not in dev[0].request("IBSS_RSN 00:11:22:33:44"):
|
||||
raise Exception("Unexpected success on invalid IBSS_RSN")
|
||||
if "FAIL" not in dev[0].request("BLACKLIST 00:11:22:33:44"):
|
||||
raise Exception("Unexpected success on invalid BLACKLIST")
|
||||
if "FAIL" not in dev[0].request("BSSID_IGNORE 00:11:22:33:44"):
|
||||
raise Exception("Unexpected success on invalid BSSID_IGNORE")
|
||||
|
||||
@remote_compatible
|
||||
def test_wpas_ctrl_wps_errors(dev):
|
||||
|
@ -1078,43 +1078,43 @@ def test_wpas_ctrl_nfc_get_handover(dev):
|
|||
if "FAIL" in dev[0].request("NFC_GET_HANDOVER_SEL " + v):
|
||||
raise Exception("Unexpected NFC_GET_HANDOVER_SEL failure for " + v)
|
||||
|
||||
def get_blacklist(dev):
|
||||
return dev.request("BLACKLIST").splitlines()
|
||||
def get_bssid_ignore_list(dev):
|
||||
return dev.request("BSSID_IGNORE").splitlines()
|
||||
|
||||
@remote_compatible
|
||||
def test_wpas_ctrl_blacklist(dev):
|
||||
"""wpa_supplicant ctrl_iface BLACKLIST"""
|
||||
if "OK" not in dev[0].request("BLACKLIST clear"):
|
||||
raise Exception("BLACKLIST clear failed")
|
||||
b = get_blacklist(dev[0])
|
||||
def test_wpas_ctrl_bssid_ignore(dev):
|
||||
"""wpa_supplicant ctrl_iface BSSID_IGNORE"""
|
||||
if "OK" not in dev[0].request("BSSID_IGNORE clear"):
|
||||
raise Exception("BSSID_IGNORE clear failed")
|
||||
b = get_bssid_ignore_list(dev[0])
|
||||
if len(b) != 0:
|
||||
raise Exception("Unexpected blacklist contents: " + str(b))
|
||||
if "OK" not in dev[0].request("BLACKLIST 00:11:22:33:44:55"):
|
||||
raise Exception("BLACKLIST add failed")
|
||||
b = get_blacklist(dev[0])
|
||||
raise Exception("Unexpected BSSID ignore list contents: " + str(b))
|
||||
if "OK" not in dev[0].request("BSSID_IGNORE 00:11:22:33:44:55"):
|
||||
raise Exception("BSSID_IGNORE add failed")
|
||||
b = get_bssid_ignore_list(dev[0])
|
||||
if "00:11:22:33:44:55" not in b:
|
||||
raise Exception("Unexpected blacklist contents: " + str(b))
|
||||
if "OK" not in dev[0].request("BLACKLIST 00:11:22:33:44:56"):
|
||||
raise Exception("BLACKLIST add failed")
|
||||
b = get_blacklist(dev[0])
|
||||
raise Exception("Unexpected BSSID ignore list contents: " + str(b))
|
||||
if "OK" not in dev[0].request("BSSID_IGNORE 00:11:22:33:44:56"):
|
||||
raise Exception("BSSID_IGNORE add failed")
|
||||
b = get_bssid_ignore_list(dev[0])
|
||||
if "00:11:22:33:44:55" not in b or "00:11:22:33:44:56" not in b:
|
||||
raise Exception("Unexpected blacklist contents: " + str(b))
|
||||
if "OK" not in dev[0].request("BLACKLIST 00:11:22:33:44:56"):
|
||||
raise Exception("BLACKLIST add failed")
|
||||
b = get_blacklist(dev[0])
|
||||
raise Exception("Unexpected BSSID ignore list contents: " + str(b))
|
||||
if "OK" not in dev[0].request("BSSID_IGNORE 00:11:22:33:44:56"):
|
||||
raise Exception("BSSID_IGNORE add failed")
|
||||
b = get_bssid_ignore_list(dev[0])
|
||||
if "00:11:22:33:44:55" not in b or "00:11:22:33:44:56" not in b or len(b) != 2:
|
||||
raise Exception("Unexpected blacklist contents: " + str(b))
|
||||
raise Exception("Unexpected BSSID ignore list contents: " + str(b))
|
||||
|
||||
if "OK" not in dev[0].request("BLACKLIST clear"):
|
||||
raise Exception("BLACKLIST clear failed")
|
||||
if dev[0].request("BLACKLIST") != "":
|
||||
raise Exception("Unexpected blacklist contents")
|
||||
if "OK" not in dev[0].request("BSSID_IGNORE clear"):
|
||||
raise Exception("BSSID_IGNORE clear failed")
|
||||
if dev[0].request("BSSID_IGNORE") != "":
|
||||
raise Exception("Unexpected BSSID ignore list contents")
|
||||
|
||||
@remote_compatible
|
||||
def test_wpas_ctrl_blacklist_oom(dev):
|
||||
"""wpa_supplicant ctrl_iface BLACKLIST and out-of-memory"""
|
||||
def test_wpas_ctrl_bssid_ignore_oom(dev):
|
||||
"""wpa_supplicant ctrl_iface BSSID_IGNORE and out-of-memory"""
|
||||
with alloc_fail(dev[0], 1, "wpa_blacklist_add"):
|
||||
if "FAIL" not in dev[0].request("BLACKLIST aa:bb:cc:dd:ee:ff"):
|
||||
if "FAIL" not in dev[0].request("BSSID_IGNORE aa:bb:cc:dd:ee:ff"):
|
||||
raise Exception("Unexpected success with allocation failure")
|
||||
|
||||
def test_wpas_ctrl_log_level(dev):
|
||||
|
|
Loading…
Reference in a new issue