diff mbox series

tests: fix ap_acl_deny test

Message ID 1540293832-30801-1-git-send-email-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series tests: fix ap_acl_deny test | expand

Commit Message

Otcheretianski, Andrei Oct. 23, 2018, 11:23 a.m. UTC
From: "Ayala Beker" <ayala.beker@intel.com>

In ap_acl_deny test, the AP doesn't send probe responses during scan
due to ACL reject. As the result, dev[0] might miss the AP's beacon because
the dwell time is too short.
Make the test more robust and trigger passive scan, and by that
increase the probability of hearing the AP.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
---
 tests/hwsim/test_ap_params.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jouni Malinen Nov. 22, 2018, 3:02 p.m. UTC | #1
On Tue, Oct 23, 2018 at 02:23:52PM +0300, Andrei Otcheretianski wrote:
> In ap_acl_deny test, the AP doesn't send probe responses during scan
> due to ACL reject. As the result, dev[0] might miss the AP's beacon because
> the dwell time is too short.
> Make the test more robust and trigger passive scan, and by that
> increase the probability of hearing the AP.

Thanks, applied.
diff mbox series

Patch

diff --git a/tests/hwsim/test_ap_params.py b/tests/hwsim/test_ap_params.py
index 07088f8..cd68469 100644
--- a/tests/hwsim/test_ap_params.py
+++ b/tests/hwsim/test_ap_params.py
@@ -150,7 +150,7 @@  def test_ap_acl_deny(dev, apdev):
     params['ssid'] = ssid
     params['deny_mac_file'] = "hostapd.macaddr"
     hapd = hostapd.add_ap(apdev[0], params)
-    dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
+    dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412", passive=True)
     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")