From: Jouni Malinen Date: Thu, 15 May 2014 15:04:59 +0000 (+0300) Subject: tests: Make ap_acl_accept and ap_acl_deny more robust X-Git-Tag: hostap_2_2~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e49399b6f58cee002f006a46e0e51e57231093b;p=thirdparty%2Fhostap.git tests: Make ap_acl_accept and ap_acl_deny more robust Use scan_for_bss() to make sure the AP is seen even under heavy CPU load. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_params.py b/tests/hwsim/test_ap_params.py index e9900bd4a..9a22596aa 100644 --- a/tests/hwsim/test_ap_params.py +++ b/tests/hwsim/test_ap_params.py @@ -79,7 +79,9 @@ def test_ap_acl_accept(dev, apdev): params['ssid'] = ssid params['accept_mac_file'] = "hostapd.macaddr" hapd = hostapd.add_ap(apdev[0]['ifname'], params) + dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412") dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412") + dev[1].scan_for_bss(apdev[0]['bssid'], freq="2412") dev[1].connect(ssid, key_mgmt="NONE", scan_freq="2412") dev[0].request("REMOVE_NETWORK all") dev[1].request("REMOVE_NETWORK all") @@ -98,7 +100,9 @@ def test_ap_acl_deny(dev, apdev): params['ssid'] = ssid params['deny_mac_file'] = "hostapd.macaddr" hapd = hostapd.add_ap(apdev[0]['ifname'], params) + dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412") dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412", wait_connect=False) + dev[1].scan_for_bss(apdev[0]['bssid'], freq="2412") dev[1].connect(ssid, key_mgmt="NONE", scan_freq="2412") ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1) if ev is not None: