From 1965cc3aa8455cee110c71fb70c0b3454ca3e84d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 4 Nov 2013 16:36:19 +0200 Subject: [PATCH] tests: Verify HS 2.0 excluded AP reporting Signed-hostap: Jouni Malinen --- tests/hwsim/test_ap_hs20.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index 9bcbab5eb..49b9c65d0 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -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"""