Browse Source

tests: Make ap_acs_40mhz more robust

Explicitly clear cached scan results on the AP interface before starting
ACS. This avoids issues where conflicting BSS entries from previously
executed test cases could affect channel selection.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 10 years ago
parent
commit
0860b2199f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tests/hwsim/test_ap_acs.py

+ 2 - 0
tests/hwsim/test_ap_acs.py

@@ -10,6 +10,7 @@ import subprocess
 import time
 import time
 
 
 import hostapd
 import hostapd
+from test_ap_ht import clear_scan_cache
 
 
 def force_prev_ap_on_24g(ap):
 def force_prev_ap_on_24g(ap):
     # For now, make sure the last operating channel was on 2.4 GHz band to get
     # For now, make sure the last operating channel was on 2.4 GHz band to get
@@ -92,6 +93,7 @@ def test_ap_multi_bss_acs(dev, apdev):
 
 
 def test_ap_acs_40mhz(dev, apdev):
 def test_ap_acs_40mhz(dev, apdev):
     """Automatic channel selection for 40 MHz channel"""
     """Automatic channel selection for 40 MHz channel"""
+    clear_scan_cache(apdev[0]['ifname'])
     force_prev_ap_on_24g(apdev[0])
     force_prev_ap_on_24g(apdev[0])
     params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
     params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
     params['channel'] = '0'
     params['channel'] = '0'