From 7e49399b6f58cee002f006a46e0e51e57231093b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 15 May 2014 18:04:59 +0300 Subject: [PATCH] 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 --- tests/hwsim/test_ap_params.py | 4 ++++ 1 file changed, 4 insertions(+) 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: