tests: Verify HS 2.0 excluded AP reporting

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-11-04 16:36:19 +02:00 committed by Jouni Malinen
parent 19839f8efc
commit 1965cc3aa8

View File

@ -717,6 +717,7 @@ def policy_test(dev, ap, values, only_one=True):
events = [] events = []
while True: while True:
ev = dev.wait_event(["INTERWORKING-AP", "INTERWORKING-NO-MATCH", ev = dev.wait_event(["INTERWORKING-AP", "INTERWORKING-NO-MATCH",
"INTERWORKING-BLACKLISTED",
"INTERWORKING-SELECTED"], timeout=15) "INTERWORKING-SELECTED"], timeout=15)
if ev is None: if ev is None:
raise Exception("Network selection timed out") raise Exception("Network selection timed out")
@ -777,9 +778,15 @@ def test_ap_hs20_excluded_ssid(dev, apdev):
values = default_cred() values = default_cred()
values['excluded_ssid'] = "test-hs20" values['excluded_ssid'] = "test-hs20"
policy_test(dev[0], apdev[1], values) events = policy_test(dev[0], apdev[1], values)
ev = [e for e in events if "INTERWORKING-BLACKLISTED " + apdev[0]['bssid'] in e]
if len(ev) != 1:
raise Exception("Excluded network not reported")
values['excluded_ssid'] = "test-hs20-other" values['excluded_ssid'] = "test-hs20-other"
policy_test(dev[0], apdev[0], values) events = policy_test(dev[0], apdev[0], values)
ev = [e for e in events if "INTERWORKING-BLACKLISTED " + apdev[1]['bssid'] in e]
if len(ev) != 1:
raise Exception("Excluded network not reported")
def test_ap_hs20_roam_to_higher_prio(dev, apdev): def test_ap_hs20_roam_to_higher_prio(dev, apdev):
"""Hotspot 2.0 and roaming from current to higher priority network""" """Hotspot 2.0 and roaming from current to higher priority network"""