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>
This commit is contained in:
Jouni Malinen 2016-10-29 22:23:53 +03:00
parent 4ec1fd8e42
commit 96a5b80958

View file

@ -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)