]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Verify HS 2.0 excluded AP reporting
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 4 Nov 2013 14:36:19 +0000 (16:36 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 25 Feb 2014 23:24:25 +0000 (01:24 +0200)
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

tests/hwsim/test_ap_hs20.py

index 9bcbab5eb3e55caa656c423adf1d9eaa79fc13a7..49b9c65d0a08c91ca6d065faaf5fab8dd159a413 100644 (file)
@@ -717,6 +717,7 @@ def policy_test(dev, ap, values, only_one=True):
     events = []
     while True:
         ev = dev.wait_event(["INTERWORKING-AP", "INTERWORKING-NO-MATCH",
+                             "INTERWORKING-BLACKLISTED",
                              "INTERWORKING-SELECTED"], timeout=15)
         if ev is None:
             raise Exception("Network selection timed out")
@@ -777,9 +778,15 @@ def test_ap_hs20_excluded_ssid(dev, apdev):
 
     values = default_cred()
     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"
-    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):
     """Hotspot 2.0 and roaming from current to higher priority network"""