From: Jouni Malinen Date: Sat, 29 Oct 2016 19:23:53 +0000 (+0300) Subject: tests: Make ap_interworking_scan_filtering more robust X-Git-Tag: hostap_2_7~2141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96a5b809582f608d4f6b38e87933156305da35d0;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index 6a7e52a5a..9cc49888c 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)