]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make ap_interworking_scan_filtering more robust
authorJouni Malinen <j@w1.fi>
Sat, 29 Oct 2016 19:23:53 +0000 (22:23 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 29 Oct 2016 19:23:53 +0000 (22:23 +0300)
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>
tests/hwsim/test_ap_hs20.py

index 6a7e52a5a0e0720b60860e76b683de80e10eb14a..9cc49888c515c3785f8e086edf6bef2ba35122e7 100644 (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)