aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-10-29 19:23:53 (GMT)
committerJouni Malinen <j@w1.fi>2016-10-29 19:23:53 (GMT)
commit96a5b809582f608d4f6b38e87933156305da35d0 (patch)
treec00f2acecadbc490aae3dad509f913d7223aebde /tests
parent4ec1fd8e42bad9390f14a58225b6e5f6fb691950 (diff)
downloadhostap-96a5b809582f608d4f6b38e87933156305da35d0.zip
hostap-96a5b809582f608d4f6b38e87933156305da35d0.tar.gz
hostap-96a5b809582f608d4f6b38e87933156305da35d0.tar.bz2
tests: Make ap_interworking_scan_filtering more robust
It was possible for the first wt.clear_bss_counters(bssid) call to fail the test if timing worked out in a way that the wlantest process had not received any Beacon frames from the first AP. Run a directed scan for both of the BSSs before starting the test validation steps to make sure such a case cannot fail this test case. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_hs20.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index 6a7e52a..9cc4988 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -403,6 +403,13 @@ def _test_ap_interworking_scan_filtering(dev, apdev):
wt = Wlantest()
wt.flush()
+ # Make sure wlantest has seen both BSSs to avoid issues in trying to clear
+ # counters for non-existing BSS.
+ dev[0].scan_for_bss(bssid, freq="2412")
+ dev[0].scan_for_bss(bssid2, freq="2412")
+ wt.clear_bss_counters(bssid)
+ wt.clear_bss_counters(bssid2)
+
logger.info("Check probe request filtering based on HESSID")
dev[0].request("SET hessid " + bssid2)